diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 22:20:49 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 33f62509fc515c767cbef8d329d7666697e54ae7 (patch) | |
| tree | f6ea7fa830b468a0409396acfb5bb6cd346a80c7 /test/fs.py | |
| parent | fe9786bf845f844315221e08eba793ac1d27ae9d (diff) | |
| download | pardes-33f62509fc515c767cbef8d329d7666697e54ae7.tar.gz pardes-33f62509fc515c767cbef8d329d7666697e54ae7.zip | |
A Restore logs restored <old> <new> for each pane
A script holding serials from before a Restore could not find its panes: the
replacement numbers them afresh. The dump now keeps each pane's serial (0 in
older dumps), and the replacement's log says `restored <old> <new>` for each
after its `restore <path>`.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/fs.py')
| -rw-r--r-- | test/fs.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -662,7 +662,10 @@ def test(binary, quic=False): raise AssertionError('Restore left an old body fid usable') with Client(address) as restored: # The new log names its panes, then where they came from. - assert restored.read('/log').endswith(b'\nrestore ' + str(saved).encode() + b'\n'), restored.read('/log') + log = restored.read('/log') + assert b'\nrestore ' + str(saved).encode() + b'\n' in log, log + # then which serial each pane had: restored <old> <new> + assert log.endswith(b'\n'.join(b'restored %d %d' % (old, new) for old, new in zip(sorted(old_ids), sorted(int(r.split()[0]) for r in restored.read('/index').splitlines()))) + b'\n'), log restored_ids = [int(row.split()[0]) for row in restored.read('/index').splitlines()] assert len(restored_ids) == 2 and old_ids.isdisjoint(restored_ids), restored_ids file_id, control_id = restored_ids |
