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
F168121011: D57787.id180475.diff
Wed, Aug 26, 11:45 AM
F168087459: D57787.id.diff
Wed, Aug 26, 7:55 AM
F168052876: D57787.diff
Wed, Aug 26, 3:55 AM
Unknown Object (File)
Tue, Aug 25, 7:51 PM
Unknown Object (File)
Tue, Aug 25, 1:56 PM
Unknown Object (File)
Mon, Aug 24, 8:33 PM
Unknown Object (File)
Thu, Aug 20, 10:46 PM
Unknown Object (File)
Thu, Aug 13, 2:02 AM
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.