diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 10:55:10 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 2a71bff5f06ba3e785a5eb96a8377e2cab8e2cdd (patch) | |
| tree | 05ba873c6696b4e88261e8fe20482c498ed52eb6 /test | |
| parent | 68a74ec034a24c9b016497880e375f291498ae5f (diff) | |
| download | pardes-2a71bff5f06ba3e785a5eb96a8377e2cab8e2cdd.tar.gz pardes-2a71bff5f06ba3e785a5eb96a8377e2cab8e2cdd.zip | |
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 <serial|-> <file>:
<why> 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 <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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') |
