summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 18:23:54 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit6bbd540882712a1823c87b7921a5606e65668bd5 (patch)
tree255aacbd667fb47e563f7a0d6f62c172068e6c75
parent66500ac6e4f002a673e95e9788a4992178bf989a (diff)
downloadpardes-6bbd540882712a1823c87b7921a5606e65668bd5.tar.gz
pardes-6bbd540882712a1823c87b7921a5606e65668bd5.zip
The 9P monkey's one-failure rule is a write's: a refused open, create or remove, or a write to pane/new, must log no err
The coordinator's reading of fs.md, now documented (slnyzzps): only a write or truncation logs its reason; a refused open (pane/new's and an OTRUNC one included), create or remove is its Rerror alone, and so is a write to pane/new. The oracle allowed an err or none for those, and required one for a refused pane/new open. Co-Authored-By: Claude Opus 5.5 <[email protected]>
-rw-r--r--test/monkey9p.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/monkey9p.py b/test/monkey9p.py
index 6a8f27c1..c0e99fb8 100644
--- a/test/monkey9p.py
+++ b/test/monkey9p.py
@@ -1491,9 +1491,11 @@ def one_failure_rule(ctx, res):
if res.window is None or res.hung_up:
return None
writes = res.writes()
- # A refused open with OTRUNC may be refused for the open, not the
- # truncation (event's `file in use`): allowed an err or none, below.
- failed = [w for w in writes if w[2] is False and w[0] != 'trunc']
+ # The rule is a write's: a refused open (pane/new's and an OTRUNC one
+ # too), create or remove logs no err, nor does a write to pane/new
+ # (`permission denied`: it is only read).
+ failed = [w for w in writes if w[2] is False and w[0] in ('write', 'clunk-write')
+ and w[1].rstrip('/') != '/pane/new']
errs = occurrences(res.window, 'err')
msgs = occurrences(res.window, 'msg')
# Only for a write that succeeded: a failed one logs its one err.
@@ -1502,11 +1504,7 @@ def one_failure_rule(ctx, res):
# fs.md 'A write of command lines ... what is left when it closes runs at
# the close ... and its failure is in the log alone'.
closes = [r for r in res.requests if r[0] == 'close-runs']
- # Refused opens (other than pane/new), removes and creates are not named
- # by the rule: allow an err or none.
- other = [r for r in res.requests if r[2] is False and (
- r[0] in ('remove', 'create', 'trunc') or r[0] == 'open' and r[1].rstrip('/') != '/pane/new')]
- lo, hi = len(failed), len(failed) + allowed + len(closes) + len(other)
+ lo, hi = len(failed), len(failed) + allowed + len(closes)
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}')