From 638122f18a66669c433e332c91fc8b068019681e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 21 Nov 2026 03:38:59 -0300 Subject: test: the window's upgrade test knows a client that execs: gui_upgrades expected its second window (a client of the old build) to be let go and told to upgrade; a client of a build that execs (since the clients are carried: knows_exec) comes back on the new build, the same process, so the wait for its exit timed out whenever the old build was a recent one; found by the coordinator's run from the installed build (main's ReleaseSafe) to pardes-merge46's: now the two cases, as upgrade_clients has them; from main's build 2 of 2, from the build before the exec (0.24 of 2026-11-17) 1 of 1 Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- test/daemon.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'test/daemon.py') diff --git a/test/daemon.py b/test/daemon.py index 37487a99..acfa4896 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -3051,10 +3051,20 @@ def gui_upgrades(old, new): assert client.read(f'/pane/{text}/body') == b'one\ntwo\n' assert alive(shell_pid) and ppid(shell_pid) == proc.pid and alive(sleeper) wait_for('the window drawn again', lambda: frames[0].stat().st_mtime > mark) - # The second, a client of the old build: let go and told to upgrade too. - second.p.wait(timeout=30) - said = second.err.read_bytes() - assert b'upgrade this client too' in said or b'run the same pardes at both ends' in said, said[-400:] + if knows_exec(old): + # The second, a client of a build that execs: the same process, + # on the build at its start path (upgrade_clients checks its + # view; here that it is carried and not let go). + wait_for('the second window on the new build', lambda: exe_of(second.pid) == (str(binary), True), timeout=30) + assert second.p.poll() is None + second.p.terminate() + second.p.wait(timeout=30) + else: + # The second, a client of a build before the exec: let go and + # told to upgrade too. + second.p.wait(timeout=30) + said = second.err.read_bytes() + assert b'upgrade this client too' in said or b'run the same pardes at both ends' in said, said[-400:] said = Replica(root / 'pardes-replica.sock').hello('win', semantics(new)) assert said == ('welcome', proc.pid, 'win'), said os.kill(sleeper, signal.SIGTERM) -- cgit v1.3