summaryrefslogtreecommitdiff
path: root/9proc/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-19 23:55:47 -0300
committerGabriel Schneider <[email protected]>2026-09-19 23:55:47 -0300
commit3e9f8805f293f622bb885cf849b5ce47dc062ad1 (patch)
tree0f31107fd20e7a9aa065826c891d2d326efc2309 /9proc/test
parentba996acfcad1698adbf4a1834fe50e73b1c6cab9 (diff)
downloadcloud9-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 '9proc/test')
-rwxr-xr-x9proc/test/adv_linux_probe.py4
-rwxr-xr-x9proc/test/debug.sh2
2 files changed, 3 insertions, 3 deletions
diff --git a/9proc/test/adv_linux_probe.py b/9proc/test/adv_linux_probe.py
index aa28cf9..186f008 100755
--- a/9proc/test/adv_linux_probe.py
+++ b/9proc/test/adv_linux_probe.py
@@ -309,7 +309,7 @@ def attack_probe(ns, server):
time.sleep(1.0)
ok("no fd leak over 1000 connect/disconnect cycles", fds(s.pid) == f0, (f0, fds(s.pid)))
held = [client(s.path, timeout=8) for _ in range(14)]
- pl = subprocess.Popen([ns, "--unix", s.path, "--", "sh", "-c", "cat /mnt/9p/build/zig_version; echo; sleep 1000"],
+ pl = subprocess.Popen([ns, "--unix", s.path, "--mount", "/mnt/9p", "--", "sh", "-c", "cat /mnt/9p/build/zig_version; echo; sleep 1000"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
seen = pl.stdout.readline().strip()
ok("9ns mount alongside 14 attached clients", bool(seen), seen)
@@ -331,7 +331,7 @@ def attack_probe(ns, server):
time.sleep(0.2)
ok("attached clients are never evicted by a flood", all(h.path_read([b"build", b"zig_version"]) for h in held))
ok("the 9ns mount survives the flood", pl.poll() is None)
- pl2 = subprocess.run([ns, "--unix", s.path, "--", "cat", "/mnt/9p/build/zig_version"], capture_output=True, timeout=30)
+ pl2 = subprocess.run([ns, "--unix", s.path, "--mount", "/mnt/9p", "--", "cat", "/mnt/9p/build/zig_version"], capture_output=True, timeout=30)
ok("a new 9ns mount is refused cleanly while the table is full", pl2.returncode != 0 or bool(pl2.stdout.strip()), pl2.stderr[-100:])
for so in slow:
so.close()
diff --git a/9proc/test/debug.sh b/9proc/test/debug.sh
index 1334dff..fbe726b 100755
--- a/9proc/test/debug.sh
+++ b/9proc/test/debug.sh
@@ -18,7 +18,7 @@ pass() { PASSED=$((PASSED + 1)); echo "ok - $1"; }
fail() { FAILED=$((FAILED + 1)); echo "FAIL - $1"; shift; [ $# -gt 0 ] && printf ' %s\n' "$@"; }
expect_eq() { if [ "$2" = "$3" ]; then pass "$1"; else fail "$1" "expected: $(printf %q "$2")" "actual: $(printf %q "$3")"; fi; }
expect_contains() { case "$3" in *"$2"*) pass "$1" ;; *) fail "$1" "missing: $(printf %q "$2")" "in: $(printf %q "$3")" ;; esac; }
-run_in() { timeout 60 "$NS" --unix "$SOCK" -- sh -c "$1" 2>"$TMP/stderr"; }
+run_in() { timeout 60 "$NS" --unix "$SOCK" --mount "$M" -- sh -c "$1" 2>"$TMP/stderr"; }
SOCK=$TMP/dbg.sock
"$PROC" --unix "$SOCK" >"$TMP/server.log" 2>&1 &