diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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') |
