test(9p): run the conformance special-files cases over the wire - #16
Merged
Conversation
`p9Driver` gains `mountx.mknod` — a `Tmknod`, with `dev` split the way `P9Session` puts it back together — so the five special-files cases run over the 9P column instead of skipping: `stat` and `readdir` agreeing on the type predicates off `Rgetattr`'s own encoding, `rdev` surviving the `major`/`minor` round trip, a FIFO renamed and unlinked as an ordinary name, and `EEXIST`/`ENOENT`/`EPERM` arriving as `Rlerror`. `THROUGH_9P` declares the extension for what it carries; the node-fs oracle overrides it back to `[]`, because that target implements no `mountx.mknod` and `#mknod` answers `ENOSYS` there — which is the difference between a capability and a claim. The other columns keep the skip for reasons of their own, now named where the blanket "no wire representation" line used to be. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
The 9P half of #14: the conformance suite's five special files cases run
over the 9P column instead of skipping — 10 new cells in
.agents/conformance-matrix.md.What moved
test/9p/client.ts—p9Drivergainsmountx.mknod. It is aTmknod,with
devcoming apart intomajor/minorthe same 8-bit wayP9Session.#mknodputs it back together. The client decides nothing: 9P2000.Lcarries the whole
mode, type bits included, and the session hands it to thedriver's extension unchanged, so
EEXIST,ENOENTandEPERM-for-a-directoryare the memory driver's own answers arriving as
Rlerror.test/9p/conformance.test.ts—THROUGH_9Pdeclaresextensions: ["mknod"](THROUGH_9P_REOPENEDspreads it). The node-fs oracletarget overrides it back to
[]: that driver implements nomountx.mknodand#mknodrightly answersENOSYSthere, which is the difference between acapability and a claim.
test/matrix.ts,.agents/testing.md— the "only the loopback column hasit" prose is replaced by which columns offer the extension by name and why each
of the others does not.
What it buys over the session tests
test/9p/session.test.ts:1788already proves the dispatch. These cases put aFIFO through the rest of the surface over the wire:
statandreaddiragreeingon the seven type predicates decoded from
Rgetattr's own mode,rdevsurvivingthe
major/minorsplit and the singlerdev[8]rejoining it, a special filerenamed and unlinked as an ordinary name, and each refusal arriving as this
transport's error reply.
On invariant 5
Declaring the extension here is not faking a capability: the client routes a real
Tmknodto a real session,resolveCapabilitieswould infer the same thing fromObject.keys(driver.mountx)anyway (src/harness.ts:44-45), and the columnsalready declare capabilities as transport claims rather than driver truths. The
old "no wire representation" justification was the weaker half —
Tmknodis one.What keeps it honest is that the declaration names what that target delivers,
hence the oracle's override.
Not in scope
NFSv3 and NFSv4.1 keep the skip, and #14 now tracks why: both put the file type
in
ftype3/nfs_ftype4rather than in the mode, so two of the five cases cannotroute faithfully —
NF4DIRis mkdir andNF4REGisNFS4ERR_BADTYPE— andexpressing partial carriage needs a suite change, not a wiring change. FUSE and S3
stay out for the reasons they always had.
pnpm testgreen (2985 passed, 310 skipped);pnpm matrixregenerated, the 9Pcolumn moving from 192 passed / 18 skipped to 202 / 8.
🤖 Generated with Claude Code