Page MenuHomeFreeBSD

fusefs: add a regression test for a cluster_read bug
ClosedPublic

Authored by asomers on Jul 14 2025, 11:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 7 2025, 2:16 AM
Unknown Object (File)
Dec 7 2025, 12:10 AM
Unknown Object (File)
Nov 20 2025, 7:16 AM
Unknown Object (File)
Nov 20 2025, 4:40 AM
Unknown Object (File)
Nov 20 2025, 4:39 AM
Unknown Object (File)
Nov 20 2025, 4:39 AM
Unknown Object (File)
Nov 10 2025, 9:42 AM
Unknown Object (File)
Nov 10 2025, 3:17 AM
Subscribers

Details

Summary

If VOP_BMAP returns an error during readahead, cluster_read will fail
the read, even though the actually requested data was read just fine.

This commit includes the regression test only. The solution is under
review at https://reviews.freebsd.org/D51254 .

PR: 264196
Reported by: danfe

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 65435
Build 62318: arc lint + arc unit

Event Timeline

Would you like me to check if the test really fails on an unpatched system?

tests/sys/fs/fusefs/bmap.cc
264

How about checking 4 identical reads? Just in case the failure having a pattern "OK FAIL OK FAIL".

Would you like me to check if the test really fails on an unpatched system?

I already have, and it really does fail.

@arrowd now that you've committed the main bmap patch, are you ok with this test?

I had to learn a bit about gmock to properly review this. LGTM, FWIW.

This revision is now accepted and ready to land.Oct 23 2025, 1:34 PM