diff options
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()) |
