diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-01 15:50:00 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-01 15:57:25 -0300 |
| commit | d79c5de9dbf77c06fb2174782093051786be2153 (patch) | |
| tree | 8887d7e6dfea6023b9c7a05124eab56037198868 /test/daemon.py | |
| parent | 15bd47670102ceae36565ee299fd8a40625c3b21 (diff) | |
| download | pardes-d79c5de9dbf77c06fb2174782093051786be2153.tar.gz pardes-d79c5de9dbf77c06fb2174782093051786be2153.zip | |
fs: /sessions, the pardes daemon's registry in every session's tree, as pardes --ps lists it and a record a line, as the daemon says it (daemon <pid>; session <pid> tty|gui attached|detached <name>, a shell <pid> line for each shell it holds; orphan <pid>): a snapshot frozen at the open as /listeners is, its read the daemon's `list` asked out of the turn as a tape site (`sessions`), so a replica reads the authority's answer; none in a build with no daemon (web, esp32), and `no pardes daemon answers` with none running or one too old to list; README, the reference and Scripting's ls say it; test/daemon.py --manage reads it beside --ps
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 2c2ee318..954433a9 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -537,6 +537,14 @@ def manage(binary): for name in ('one', 'two'): assert f'session {name} {sessions[name]} (tty, detached)' in listed, listed assert f'shell {shells[name]}' in listed, listed + # The same, a record a line, in each session's /sessions. + with Client(root / 'pardes-9p-one.sock') as c: + records = c.read('/sessions').decode().splitlines() + assert records[0] == f'daemon {daemon}', records + for name in ('one', 'two'): + at = records.index(f'session {sessions[name]} tty detached {name}') + assert records[at + 1] == f'shell {shells[name]}', records + print('manage: /sessions read over 9P listed the daemon, both sessions and their shells') os.kill(sessions['two'], signal.SIGKILL) wait_for('session two gone', lambda: not alive(sessions['two'])) wait_for('its shell no session\'s', lambda: 'no session holds' in cli('--ps').stdout.decode()) |
