summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 10:13:10 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commita9e3191c8463bd6841b9c8ac3cc3a6aebd351945 (patch)
tree6613fc61872cfb6242153102220c44d057605796
parent94343583eb6aefa8f421083409256c877aad036e (diff)
downloadpardes-a9e3191c8463bd6841b9c8ac3cc3a6aebd351945.tar.gz
pardes-a9e3191c8463bd6841b9c8ac3cc3a6aebd351945.zip
The 9P monkey lets a failed write's op log a msg when another of its Twrites succeeded
A ctl line cut across Twrites runs a piece a Twrite: in seed 109, "Save Pl" ran Save and said so, and the next piece, "acem", was refused. one_failure_rule took the msg as the failed write's. It now flags a msg only when no Twrite of the op succeeded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
-rw-r--r--test/monkey9p.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/monkey9p.py b/test/monkey9p.py
index ee0b0ebc..7ab6cb0c 100644
--- a/test/monkey9p.py
+++ b/test/monkey9p.py
@@ -1514,7 +1514,11 @@ def one_failure_rule(ctx, res):
if not lo <= len(errs) <= hi:
return (f'{len(failed)} failed write(s) logged {len(errs)} err record(s) '
f'(allowed {lo}..{hi}); failed={[(w[0], w[1], w[3]) for w in failed]} window={res.window}')
- if failed and msgs:
+ # A msg is a failed write's only when no Twrite of the op succeeded: a
+ # line cut across Twrites runs a piece a Twrite, and a piece that ran
+ # (a Save) says so while a later one is refused.
+ succeeded = [w for w in writes if w[2] is True and w[0] == 'write']
+ if failed and msgs and not succeeded:
return f'a failed write also logged msg: {msgs}; failed={[(w[1], w[3]) for w in failed]}'
return None