diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 23:32:01 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 23:33:07 -0300 |
| commit | 6d937cd125ca04a2edb92b2d014014ee6c2eb45d (patch) | |
| tree | fe223643fdf8680430e735d2ae459a33efcd5514 /test/daemon.py | |
| parent | 2a37bf10a19048576060b536d219f1f134a9baa0 (diff) | |
| download | pardes-6d937cd125ca04a2edb92b2d014014ee6c2eb45d.tar.gz pardes-6d937cd125ca04a2edb92b2d014014ee6c2eb45d.zip | |
main: an upgraded session's `new` is the verb still, not a file's name: a session started as `pardes new [--detach=NAME] FILE` ENDED at its Upgrade: its new process is given the arguments it was started with after its record, the verbs were read only when not resuming, so `new` was taken for the file and FILE was 'the second' (badArgs: the process exits; its dump stays in the state file); with no file the session lived on by luck (`new` the ignored positional); found by the coordinator's check of the release build before the install (reorg/landing: eight variants: with a file dead in all four, without alive in all four, same build or another, on Debug and ReleaseSafe); test/daemon.py's pair rows: `new --detach=kd FILE` is upgraded, lives, and is attached to after
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/daemon.py')
| -rw-r--r-- | test/daemon.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/daemon.py b/test/daemon.py index c1e0d54a..44221d17 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -767,6 +767,14 @@ def pair_rows(binary): for how in ('HUP', 'TERM'): ended_by(how, *attached('kd')) assert alive(kd) and state_of('kd') == '(tty, kept)', (how, listed()) + # Started by `new` with a file: an Upgrade keeps it (its `new` is the + # verb still: taken for a file's name, the file was "the second" and + # the session ended), and it is attached to after. + upgraded('kd', Client(root / 'pardes-9p-kd.sock'), kd).socket.close() + assert alive(kd) and state_of('kd') == '(tty, kept)', listed() + ended_by('TERM', *attached('kd')) + assert alive(kd) and state_of('kd') == '(tty, kept)', listed() + print('pair rows: `new --detach` with a file: an Upgrade keeps it, and it is attached to after') assert subprocess.run([binary, 'kill', 'kd'], env=env, capture_output=True, timeout=30).returncode == 0 wait_for('kd ended', lambda: not alive(kd), timeout=30) print('pair rows: `new --detach` kept from birth (ps: (tty, kept)); its client ended by HUP, by TERM: it runs on') |
