summaryrefslogtreecommitdiff
path: root/test/daemon.py
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 09:36:22 -0300
committerGabriel Schneider <[email protected]>2026-11-20 11:35:33 -0300
commitefbb9bb38b800deb47e581fd7b0a7ea06d504122 (patch)
treec06a0b742b1ce6b788b9baeddc7b6f008d4604ce /test/daemon.py
parent6ba1f5be0a838d1fda81425300ed5aca90b1f1ab (diff)
downloadpardes-efbb9bb38b800deb47e581fd7b0a7ea06d504122.tar.gz
pardes-efbb9bb38b800deb47e581fd7b0a7ea06d504122.zip
attachClient: a far attach dials the forwarded socket until a connect answers, within the same 30 s, not only until its file is there: ssh binds the socket (its file) a moment before it listens, and a client that dialled between the two was told 'nothing answers at .../pardes-ssh-N.sock' (4 of 40 attaches through test/daemon.py's stand-in ssh at a load of 38-45; 10 of 10 with 0.5 s between its bind and listen); the probe is cloud9's connectFd, closed at once, then the client dials as before: 0 of 40 and 0 of 20 refused-name attaches with the 0.5 s; test/delay_relay.py --bound MS holds a socket bound that long before listening, and daemon.py --far's ssh uses 500; after, pinned to one CPU: 0 of 40, and 0 of 20 with the 0.5 s; the five together: tui core-test 859/1014, shell-test 1055/1058, pane-test 183/184, term-test 17/17, kitty-test 45/45, behaviour-test 275/275 and --replay, process-test 0 of 144 (cmdexit once, again alone), daemon.py in every mode, both soaks diverged 0 unequal 0, gui unit-test 1651/1655 (BaselineHarnessMismatch), the frame and perf gate against tree2 PASS
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/daemon.py')
-rw-r--r--test/daemon.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/daemon.py b/test/daemon.py
index 2bc0cca6..f8402af2 100644
--- a/test/daemon.py
+++ b/test/daemon.py
@@ -1491,12 +1491,13 @@ def far(binary):
f_join = joins(root / 'f.stats')[0]
assert f_join['from_disk'] > 0 and cached(cache) <= (1 << 20) + (64 << 10), (f_join, cached(cache))
far_joins(root / 'pardes-replica.sock', 'files', binary, 200)
- # Through ssh (a stand-in forwarding as `ssh -L` does): a client
- # refused and one detached each end their ssh and its socket (one
- # refused left both, 2026-10-30).
+ # Through ssh (a stand-in forwarding as `ssh -L` does, its socket
+ # bound 0.5 s before it listens: the client dials until it answers):
+ # a client refused and one detached each end their ssh and its
+ # socket (one refused left both, 2026-10-30).
fake = root / 'ssh'
fake.write_text('#!/bin/sh\nwhile [ $# -gt 0 ]; do case $1 in -L) fwd=$2; shift;; esac; shift; done\n'
- f'exec {sys.executable} -B {Path(__file__).parent / "delay_relay.py"} "${{fwd%%:*}}" "${{fwd#*:}}" --delay 0\n')
+ f'exec {sys.executable} -B {Path(__file__).parent / "delay_relay.py"} "${{fwd%%:*}}" "${{fwd#*:}}" --delay 0 --bound 500\n')
fake.chmod(0o755)
senv = dict(env, PARDES_SSH=str(fake), PARDES_REMOTE_RUNTIME=str(root), TMPDIR=str(root))