From 63d584a0ba7806759f7139e87f45e411c9a1573d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 17:27:30 -0300 Subject: A Save the host cannot do fails the 9P write that asked for it, and the log names the path and why The write answered ok and the pane stayed dirty, with `save: AccessDenied` on its message row: a script saw success. The failure now says `Save : `, and a 9P write that waited on the save fails with EIO and that text, logged as an err record. Co-Authored-By: Claude Opus 5.5 --- test/fs.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/fs.py b/test/fs.py index 53a9d4df..72c52b7e 100644 --- a/test/fs.py +++ b/test/fs.py @@ -360,6 +360,16 @@ def discovery(binary, embedded=False): # 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}') + # A save the host cannot do fails the write that asked for it, + # and the log's err record names the path and why. + unsaved = new_pane(client, b'unsaved\n') + try: + client.write(f'/pane/{unsaved}/ctl', b'Save /nonexistent-pardes-dir/x.txt\n') + raise AssertionError('a Save into a missing directory succeeded') + except OSError as refused: + assert 'Save /nonexistent-pardes-dir/x.txt: ' in str(refused), refused + assert f'err {unsaved} ctl: Save /nonexistent-pardes-dir/x.txt: '.encode() in client.read('/log'), client.read('/log') + client.remove(f'/pane/{unsaved}') 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