Page MenuHomeFreeBSD

fusefs: fix two intermittency bugs in the destroy tests
ClosedPublic

Authored by asomers on Jun 23 2026, 8:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 3, 1:00 AM
Unknown Object (File)
Sun, Aug 2, 5:12 AM
Unknown Object (File)
Sun, Aug 2, 3:19 AM
Unknown Object (File)
Sun, Aug 2, 12:56 AM
Unknown Object (File)
Sat, Aug 1, 9:18 AM
Unknown Object (File)
Thu, Jul 30, 11:46 PM
Unknown Object (File)
Mon, Jul 27, 7:17 AM
Unknown Object (File)
Mon, Jul 20, 11:56 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.Jun 23 2026, 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.