Repository navigation
ci: run the fuse_mount suite against a real mount on the runner - #594
Merged
Merged
Conversation
internal/fuse/kernel_options_live_test.go is the only test that observes the kernel's half of FOPEN_DIRECT_IO and FOPEN_KEEP_CACHE, by counting READ requests through a real mount. It sat behind the fuse_mount tag, run by nothing, because a comment said ubuntu-latest had no /dev/fuse. It has one, and the suite needs nothing else (liveMount uses the in-process substrate endpoint). New fuse-mount job: reports /dev/fuse, fusermount3 and the kernel, then runs every test that exists only under -tags=fuse_mount, found with go test -list rather than named, and requires each to report PASS. A build-tag suite can pass by running nothing when the tag stops selecting the file; this turns that into a failure.
…stead of panicking (#543) The first CI run of the fuse_mount suite (previous commit) failed every read(2) with EIO. The cause was a nil-pointer panic in FileHandle.Read (filesystem.go:1066, fh.fs.cache.Get), which go-fuse recovers and answers as EIO. liveMount passes a nil cache, NewFileSystem stored it as given, and this package disagreed with itself about what nil meant: the metadata cache helpers check for it, while the data path (FileHandle.Read, the backend read helper, and the read-ahead worker) does not. The adapter always passes a cache from cache.NewFromConfig, which returns a cache or an error, so no shipped mount was affected. The constructor's contract was the defect, and the live suite was its first nil caller. NewFileSystem now substitutes noCache, which holds nothing and misses every Get, so a nil cache means no cache at every call site, including future ones. TestNilCacheReadsThroughToTheBackend reproduces the panic without a mount (small read, repeat read, sequential run to reach read-ahead), so it runs in the ordinary test job on every platform; removing the substitution brings the nil dereference back. Also from that run: TestKeepCacheSurvivesReopen closed its first descriptor only after a successful read, so a failed read left it open, the unmount failed EBUSY, and the job hung until its timeout canceled it. It is now closed on the failure path too, and the job's go test has -timeout 5m so a hang produces a goroutine dump instead of a silent cancellation.
… stop calling it unrun (#543) The previous commit was a deliberate mutation (openFlags sending no flags) and the one before it reverts that; neither changes the tree. Results, now in kernel_options_live_test.go's doc comment, which #543 named as the artifact either way: - first run: every read EIO, from the nil-cache panic fixed in fb217f6 - after the fix: all four subtests pass on ubuntu-24.04, kernel 6.17.0-1022-azure, through fusermount3's setuid path as non-root go test - the mutation: direct_io saw 1 READ (needs >= 2) and keep_cache saw 1 (needs 0) while both 'without' cases still passed, so the suite catches #180's class of a flag that never reaches the kernel The build-tags comment and the Makefile no longer say the suite is run by nothing. make test-fuse-mount drops its -run 'TestDirectIO|TestKeepCache' list, which would have silently skipped a third live test; it runs the package under the tag, as the CI job discovers tag-only tests itself.
scttfrdmn
added a commit
that referenced
this pull request
Oct 8, 2026
…heck (#595) Branch protection on main now requires fuse-mount (#543, #594): 51 required checks became 52, appended with POST to required_status_checks/contexts after confirming the context reported success on main's head (99cf288). The API's list diffed before and after: fuse-mount added, none removed. requiredChecks gains the name and diffs clean against the API at 52. Renaming the fuse-mount job now fails TestRequiredChecksStillHaveAJobToReportThem, which it could not before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #543.
#543 asked to run the
fuse_mountsuite on the runner, read the result, record it, and only then decide on a gate. All three are done here. Becoming a required check is a branch-protection change, so that's left as a separate decision.1. A
fuse-mountjobIt reports
/dev/fuse,fusermount3and the kernel first. Then it finds the tests that exist only under-tags=fuse_mount(go test -listdiffed with and without the tag) and requires a--- PASSline for each. It doesn't name the tests: a build-tag suite can pass by running nothing if the tag stops selecting its file, and an empty tag-only set fails the job. The job runsgo testwith-timeout 5m.2. What the first run found: a real defect
Every first
read(2)returnedEIO. The cause was a nil-pointer panic inFileHandle.Read(fh.fs.cache.Get), which go-fuse recovers and answers asEIO.liveMountpasses a nil cache. This package disagreed with itself about nil: the metadata cache helpers check for it, but the data path and the read-ahead worker don't.NewFileSystemsubstitutesnoCache, which misses everyGet. A nil cache now means "no cache" at every call site, including future ones.cache.NewFromConfig, which returns a cache or an error.TestNilCacheReadsThroughToTheBackendreproduces the panic without a mount (verified before the fix), so it runs everywhere. Removing the substitution brings the nil dereference back.The same run also hung for ten minutes:
TestKeepCacheSurvivesReopenleft its first descriptor open when a read failed, so the cleanup's unmount gotEBUSY. It's now closed on the failure path too.3. With the fix: all four subtests pass, and the suite fails when it should
On
ubuntu-24.04, kernel6.17.0-1022-azure, non-root throughfusermount3's setuid path, all four subtests pass.Mutation, run on CI (commit
1df0a57, reverted in3bb4138):openFlags()returning 0, so no flag reaches the kernel.That's #180's defect class (a mount option that's accepted and never reaches the kernel), and nothing else in the repo can observe it. The results are recorded in
kernel_options_live_test.go's doc comment, the artifact #543 named.Also
build-tagscomment and the Makefile no longer say the suite is run by nothing.make test-fuse-mountdrops its hardcoded-run 'TestDirectIO|TestKeepCache', which would have silently skipped a third live test.Not done: making
fuse-mountrequiredIt now reports on every PR, but a red result doesn't block a merge until branch protection lists
fuse-mount. Proposed after this merges, with the same append-only call used for the fuzz cells:🤖 Generated with Claude Code