Page MenuHomeFreeBSD

fusefs: fix two intermittency bugs in the destroy tests
ClosedPublic

Authored by asomers on Tue, Jun 23, 8:45 PM.
Tags
None
Referenced Files
F162638570: D57787.diff
Wed, Jul 15, 7:27 AM
F162638569: D57787.diff
Wed, Jul 15, 7:27 AM
Unknown Object (File)
Tue, Jul 7, 5:52 AM
Unknown Object (File)
Mon, Jul 6, 8:46 PM
Unknown Object (File)
Mon, Jul 6, 12:02 PM
Unknown Object (File)
Mon, Jul 6, 5:27 AM
Unknown Object (File)
Sun, Jul 5, 11:21 PM
Unknown Object (File)
Sun, Jul 5, 11:18 PM
Subscribers

Details

Summary
  • Though undocumented, statfs(2) can sometimes return EBADF or ENOENT while an unmount is in progress.
  • In MockFS::write_response, write(2) may fail if m_fuse_fd has already been closed. This doesn't happen in the normal sequence of events, but it can happen if some process unrelated to the test nosily decides to access the test file system while it's being unmounted.

PR: 296237
Reported by: siva
MFC after: 2 weeks
Sponsored by: ConnectWise

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

LGTM in general, it passes with 200+ runs now.

tests/sys/fs/fusefs/destroy.cc
63

I guess this could be a while (true) since we're always protected by the ATF test timeout anyway. But that's not too important.

This revision is now accepted and ready to land.Tue, Jun 23, 11:28 PM
tests/sys/fs/fusefs/destroy.cc
63

I don't want to rely on the ATF timeout here, because ATF sees each googletest program as a single ATF test case. So if ATF fails a test on the grounds of timeout, then subsequent googletest test cases won't run.