summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fs.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/fs.py b/test/fs.py
index 55ec3257..80bee07f 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -1130,7 +1130,15 @@ def test(binary, quic=False):
except OSError as refused:
assert 'Modified' in str(refused), refused
assert old.read('/pane/1/body') == b'changed after dump\n'
- execute(old, control, 'Restore ' + str(saved))
+ # Answered before the hang-up: the write's reply comes; the
+ # clunk after it may meet the connection already cut.
+ restore = old.open(f'/pane/{control}/exec', 1)
+ line = ('Restore ' + str(saved) + '\n').encode()
+ old.rpc(118, struct.pack('<IQI', restore, 0, len(line)) + line)
+ try:
+ old.close(restore)
+ except (EOFError, OSError):
+ pass
# Refused while the connections are cut, or cut already.
try:
old.read_fid(held_body)
@@ -1328,7 +1336,8 @@ def test(binary, quic=False):
client.write(f'/pane/{named}/body', b'new\n')
execute(client, named, 'Save')
client.remove(f'/pane/{named}')
- assert made.wait(timeout=5) == 0
+ code = made.wait(timeout=5)
+ assert code == 0, (code, made.stderr.read())
assert fresh.read_bytes() == b'new\n'
# ...in a directory not there either: forwarded all the same, and
# Save makes the directories.