diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-19 23:55:47 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-19 23:55:47 -0300 |
| commit | 3e9f8805f293f622bb885cf849b5ce47dc062ad1 (patch) | |
| tree | 0f31107fd20e7a9aa065826c891d2d326efc2309 /9ns/test/adv_bridge_semantics.sh | |
| parent | ba996acfcad1698adbf4a1834fe50e73b1c6cab9 (diff) | |
| download | cloud9-3e9f8805f293f622bb885cf849b5ce47dc062ad1.tar.gz cloud9-3e9f8805f293f622bb885cf849b5ce47dc062ad1.zip | |
9ns: --name and /mnt/9p/<name> mounts, qid.path as inode number, interrupts as Tflush
- --name NAME (default derived from the transport: socket basename, tcp-IP-PORT,
spawned command, fdN) mounts at /mnt/9p/<name>; --mount still overrides.
ensureMountpoint walks down and creates missing components, shadowing the
deepest unwritable ancestor. NINE_MOUNT is the only exported variable.
- The inode number reported to the kernel is the 9P qid.path for every node,
root included; a server handing qid.path 1 to a file (Pardes /self) no
longer collides with the root.
- FUSE_INTERRUPT for the request in flight becomes Tflush; a blocked read
returns EINTR when the server answers the flush, chunked transfers return
short counts, other requests arriving meanwhile are stashed and served
next. Servers ignoring Tflush still block until they answer.
- 9ns-test now covers nine/bridge/fuse; new adv_bridge_interrupt suite (28);
9ns-itest grows to 88 checks.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to '9ns/test/adv_bridge_semantics.sh')
| -rwxr-xr-x | 9ns/test/adv_bridge_semantics.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/9ns/test/adv_bridge_semantics.sh b/9ns/test/adv_bridge_semantics.sh index b38ce9c..526ebc8 100755 --- a/9ns/test/adv_bridge_semantics.sh +++ b/9ns/test/adv_bridge_semantics.sh @@ -24,7 +24,7 @@ SOCK=$TMP/i.sock SRVPID=$! for _ in $(seq 1 100); do [ -S "$SOCK" ] && break; sleep 0.02; done # Each run is a fresh session; state persists in the server, so tests clean up after themselves. -run() { OUT=$(timeout 120 "$NS" --unix "$SOCK" "${EXTRA[@]}" -- sh -c "$1" 2>"$TMP/stderr"); RC=$?; STDERR=$(cat "$TMP/stderr"); } +run() { OUT=$(timeout 120 "$NS" --unix "$SOCK" --mount "$M" "${EXTRA[@]}" -- sh -c "$1" 2>"$TMP/stderr"); RC=$?; STDERR=$(cat "$TMP/stderr"); } EXTRA=() py() { run "python3 - <<'PYEOF' $1 @@ -141,8 +141,9 @@ for n in os.listdir(d): os.unlink(f'{d}/{n}') os.rmdir(d) " expect_eq "readdir of a directory that changes mid-iteration" "a True True" "$OUT" -run "ls $M/.. > /dev/null && echo ok; stat -c %i $M $M/. $M/scratch/..; cd $M/scratch && ls .. | grep -c scratch" -expect_eq ".. of the root and of a subdir" $'ok\n1\n1\n1\n1' "$OUT" +# The root's inode number is its 9P qid.path (not a fixed 1): all three views must agree. +run "ls $M/.. > /dev/null && echo ok; stat -c %i $M $M/. $M/scratch/.. | sort -u | wc -l; cd $M/scratch && ls .. | grep -c scratch" +expect_eq ".. of the root and of a subdir" $'ok\n1\n1' "$OUT" run "cd $M && find . -type d | wc -l && find . -type f | head -1 && find $S -type f | wc -l" expect_contains "find -type works" "./README" "$OUT" run "stat -f -c '%T %S %l' $M; df -P $M | tail -1 | awk '{print \$1}'; sync -f $M && echo synced; sync && echo synced2" |
