summaryrefslogtreecommitdiff
path: root/test/daemon.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/daemon.py')
-rw-r--r--test/daemon.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/daemon.py b/test/daemon.py
index aa06c76d..32ff5908 100644
--- a/test/daemon.py
+++ b/test/daemon.py
@@ -2773,7 +2773,9 @@ def main(binary, cycles):
wait_for('the client\'s first frame', lambda: b'\x1b[?1049h' in term.text())
listed = wait_for('the client in --ps', lambda: (lambda out: f'client {stub.pid} ' in out and out)(
subprocess.run([binary, '--ps'], env=env, capture_output=True, timeout=30).stdout.decode()))
- assert f'session fresh {session} {listed_as("detached")}' in listed, listed
+ # (Under the variable the killed stub was the pair's client: a loss,
+ # the session still a pair's, P36.)
+ assert f'session fresh {session} {"(tty)" if WITH_PAIR else listed_as("detached")}' in listed, listed
print('daemon: a session whose stub was killed outright detached, and was attached again, as a client')
# The end: the session quits, its shells hang up, its client and
@@ -3186,6 +3188,10 @@ def upgrades(old, new):
# (A client of a build that execs at an Upgrade comes back: its
# connection is the session's again.)
gone = 2 if b'detached from' in term2.text() else 0 if knows_exec(old) and stub2.poll() is None else 1
+ # (Under the variable a pair's session of a build that keeps its
+ # client's terminal, P48, lets it go: close-on-exec, not carried;
+ # such a build's put-back turns the in-band resize off.)
+ gone += 1 if WITH_PAIR and b'\x1b[?2048l\x1b[0m' in Path(old).read_bytes() else 0
return fds_before[0] - 2 - gone + min(state_fds(session), 1) - state_before, fds_before[1]
try:
wait_for('the fds level', lambda: (fds(session), fds(daemon)) == level(), timeout=5)