From 2a71bff5f06ba3e785a5eb96a8377e2cab8e2cdd Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 10:55:10 -0300 Subject: A refused or failed write is an err record in the log, naming the file and the reason Through a mount every refusal reads as Invalid argument, so a shell user could not tell a missing regexp match from a bad ctl word. Every write or truncation the tree refuses or that fails now adds err : to /log. No per-pane readable error file: acme's errors only takes text, and one stream is simpler to watch. Co-Authored-By: Claude Opus 5.5 --- test/fs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/fs.py b/test/fs.py index 816f416c..c56c6298 100644 --- a/test/fs.py +++ b/test/fs.py @@ -200,7 +200,7 @@ def discovery(binary, embedded=False): assert newest(client) == second, 'a stat of new made a pane' # What the editor said is in the stream too. def pane_event(): - while (record := client.read_fid(log, frozen)).startswith(b'msg '): + while (record := client.read_fid(log, frozen)).startswith((b'msg ', b'err ')): pass return record assert pane_event() == f'new {first} {root}/+New\n'.encode() @@ -356,6 +356,8 @@ def discovery(binary, embedded=False): except OSError as refused: assert why in str(refused), refused assert client.read(f'/pane/{scratch}/body') == b'HOWDY world\nsecond line\n' + # Through a mount both read as EINVAL; the log says which and why. + assert f'err {scratch} addr: no match for regexp\n'.encode() in client.read('/log') client.remove(f'/pane/{scratch}') print('9P discovery: listing/stat/find are inert; new, remove, look, exec, name, sel, log, ctl lock, focus, the ctl split and commands behave') -- cgit v1.3