summaryrefslogtreecommitdiff
path: root/test/daemon.py
diff options
context:
space:
mode:
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 83c024c4..88e11062 100644
--- a/test/daemon.py
+++ b/test/daemon.py
@@ -789,13 +789,14 @@ def pair_rows(binary):
# Not kept: a client's close (its terminal closed, a TERM) ends the
# session when it was the last; a KILL is a loss, it runs on.
t, c, nine, session, pane = started('nk', env)
- assert ended_by('HUP', *attached('nk')) == 0
+ # Dead of the signal, its goodbye said, as the own path's stub dies.
+ assert ended_by('HUP', *attached('nk')) == -signal.SIGHUP
assert alive(session) and state_of('nk') == '(tty)', ('not its last client', listed())
os.kill(c.pid, signal.SIGKILL)
c.wait(timeout=10)
wait_for('the client unlisted', lambda: f'client {c.pid} ' not in listed())
assert alive(session) and state_of('nk') == '(tty)', ('a loss', listed())
- assert ended_by('TERM', *attached('nk')) == 0
+ assert ended_by('TERM', *attached('nk')) == -signal.SIGTERM
wait_for('the session ended at its last client\'s close', lambda: not alive(session), timeout=20)
assert state_of('nk') is None, listed()
nine.socket.close()
@@ -809,7 +810,7 @@ def pair_rows(binary):
nine.socket.close()
t.close()
terms.remove(t)
- assert c.wait(timeout=20) == 0, c.returncode
+ assert c.wait(timeout=20) == -signal.SIGHUP, c.returncode
wait_for('the session ended with its terminal', lambda: not alive(session), timeout=20)
print('pair rows: not kept, upgraded: its terminal closed (exit 0): the session ended')
# Without the variable nothing changes: an attach client's TERM
@@ -817,7 +818,7 @@ def pair_rows(binary):
own_env = {k: v for k, v in env.items() if k != 'PARDES_PAIR'}
t, c, nine, session, pane = started('own', own_env)
assert state_of('own') == '(tty, has a frontend)', listed()
- assert ended_by('TERM', *attached('own')) == 0
+ assert ended_by('TERM', *attached('own')) == -signal.SIGTERM
assert alive(session) and state_of('own') == '(tty, has a frontend)', listed()
nine.socket.close()
t.close()