diff options
Diffstat (limited to '9proc')
| -rwxr-xr-x | 9proc/test/adv_linux_probe.py | 4 | ||||
| -rwxr-xr-x | 9proc/test/debug.sh | 2 |
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 & |
