HomeFreeBSD

fusefs: fix intermittency in the BadServer.ShortWrite test

Description

fusefs: fix intermittency in the BadServer.ShortWrite test

This test implicitly depended on the order in which two threads
completed. If the test thread finished first, the test would pass. But
if the mock file system thread did, it would attempt to read from an
unmounted file system, and fail. As a result, the test would randomly
fail once out of every several thousand executions. Fix it by telling
the mock file system's event loop to exit without attempting to read any
more events.

Approved by: re (cperciva)
Reported by: Siva Mahadevan <me@svmhdvn.name>
MFC after: 1 week
Reviewed by: Siva Mahadevan <me@svmhdvn.name>
Differential Revision: https://reviews.freebsd.org/D53080

(cherry picked from commit d1bd541b385d49d2ae3a8bad9df72779b606e208)
(cherry picked from commit a1c3537148a59f6a1c86ebcb686b2e2c8e404b5f)

Details

Provenance
asomersAuthored on Oct 14 2025, 2:18 AM
cpercivaCommitted on Nov 6 2025, 11:10 PM
Differential Revision
D53080: fusefs: fix intermittency in the BadServer.ShortWrite test
Parents
rGa711949115b5: fusefs: respect the server's FUSE_SETXATTR_EXT flag
Branches
Unknown
Tags
Unknown