summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-25 14:21:49 -0300
committerGabriel Schneider <[email protected]>2026-11-25 14:49:19 -0300
commit1e4e1cb6a20b26307b259da629ce926c44585fdf (patch)
tree598ef439bd8cb98d8b51832b1a3f214550a7b2cc /test
parent46d061dd4650449ba3b30b0c6023aca251e94ebd (diff)
downloadpardes-1e4e1cb6a20b26307b259da629ce926c44585fdf.tar.gz
pardes-1e4e1cb6a20b26307b259da629ce926c44585fdf.zip
test/daemon.py: the plain row's far, by_hash and pair parts read what the walk UI draws (D1, the install gate's failure 1: `client a's first frame` TimeoutError, Debug and ReleaseSafe): far: the session's `Look big.txt` from its notes, a reading pane, steps that pane to big.txt in place under `Jumps walk` (pick-ui SPEC §6.1), so no client drew `line 3 of the notes`, and the clients' keys then went into the 1 MB file (its blob made again: B's first join was sent 1091 KB, none from disk); the session's Edit now comes first, holding the notes (SPEC §6.5, with the change before this one), and the Look opens big.txt in their reader below: the two panes the test had before the walk, the clients typing into the notes (a second client from disk 1 of 2 blobs, as before); by_hash: its Look, after A and F joined, walks the notes' pane to the 17 MiB file, so G's first frame is that file's (`00000002 `); pair: the lone pair's refused Upgrade is an error on the notice row led by its cause, the asking pane's file (the test's 85-byte scratch path), its words cut on the right in 80 columns: read from the session's /log, and the row's lead `✗` looked for; test/daemon.py plain on Debug: rc 0
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'test')
-rw-r--r--test/daemon.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/test/daemon.py b/test/daemon.py
index f9cbc9e1..d1b64843 100644
--- a/test/daemon.py
+++ b/test/daemon.py
@@ -781,8 +781,13 @@ def pair(binary):
nine2, session2 = session_of('lone')
wait_for('the lone pair drawn', lambda: b'line 3 of the notes' in lone.text(), timeout=30)
# An Upgrade refused, with why: its client could not find it again.
+ # Said (the session's /log, its history) and shown: an error, the
+ # notice row's lead (pick-ui SPEC §10.3), whose words come after
+ # its cause, the asking pane's file, cut on the right in 80 columns
+ # behind the test's long path.
nine2.write('/ctl', b'Upgrade\n')
- wait_for('the Upgrade refused', lambda: 'its client could not join it again' in screen_text(nine2), timeout=20)
+ wait_for('the Upgrade refused', lambda: b'its client could not join it again' in nine2.read('/log'), timeout=20)
+ wait_for('the refusal on the notice row', lambda: screen_text(nine2).splitlines()[-1].lstrip().startswith('\u2717 '), timeout=20)
assert alive(session2) and c2.poll() is None
nine2.socket.close()
os.kill(c2.pid, signal.SIGKILL)
@@ -2622,8 +2627,12 @@ def far(binary):
wait_for('the session\'s 9P socket', (root / 'pardes-9p-files.sock').exists)
nine = Client(root / 'pardes-9p-files.sock')
pane = next(int(row.split()[0]) for row in nine.read('/index').splitlines() if row.split()[1] == b'text')
- nine.write(f'/pane/{pane}/exec', f'Look {big}\n'.encode())
+ # The notes edited first: a held pane (pick-ui SPEC §6.1, `jumps
+ # walk` the default), whose Look opens the big file in a pane of its
+ # own (its reader) and keeps the notes, which the clients type into;
+ # a reading pane's would step it to the big file in place.
nine.write(f'/pane/{pane}/exec', b'Edit 3a/ an edit the session made /\n')
+ nine.write(f'/pane/{pane}/exec', f'Look {big}\n'.encode())
# A: the first, its cache empty: every blob sent, and kept.
ta, a = client('a')
typed('a', ta, b'from-A')
@@ -2864,14 +2873,14 @@ def by_hash(binary):
f.write(b'%08d %s\n' % (i, os.urandom(27).hex().encode()[:54]))
started, terms = [], []
- def client(name, far):
+ def client(name, far, shown=b'line 3 of the notes'):
t = Term(24, 90)
terms.append(t)
c = t.spawn([binary, f'--attach={root / "pardes-replica.sock"}:files'],
dict(env, PARDES_REPLICA_CHECK=str(root / f'{name}.check'), PARDES_REPLICA_STATS=str(root / f'{name}.stats'),
**({'PARDES_REPLICA_FAR': '1'} if far else {})))
started.append(c.pid)
- wait_for(f'client {name}\'s first frame', lambda: b'line 3 of the notes' in t.text(), timeout=30)
+ wait_for(f'client {name}\'s first frame', lambda: shown in t.text(), timeout=30)
time.sleep(.3)
return t, c
@@ -2901,7 +2910,10 @@ def by_hash(binary):
got = {c.pid: read(c.pid) - was[c.pid] for c in (a, f)}
assert size <= got[a.pid] < size + (512 << 10), (size, got)
assert got[f.pid] < size, (size, got)
- tg, g = client('g', True)
+ # The Look walked the notes' pane, a reading one, to the big file
+ # (pick-ui SPEC §6.1, `jumps walk` the default): G's first frame
+ # is the big file's.
+ tg, g = client('g', True, b'00000002 ')
os.write(tg.master, b' sD')
wait_for('client G let go', lambda: g.poll() is not None, timeout=20)
g_join = joins(root / 'g.stats')[0]