summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 10:04:23 -0300
committerGabriel Schneider <[email protected]>2026-10-01 10:36:27 -0300
commit3aa24c27c62c740cd7647831d0a14a9b180992da (patch)
tree994cb2128180441613783f305f3dd9ba45e4331a /test
parent9b641cbe3dc6c226be158e5051afafb9eb86c122 (diff)
downloadpardes-3aa24c27c62c740cd7647831d0a14a9b180992da.tar.gz
pardes-3aa24c27c62c740cd7647831d0a14a9b180992da.zip
An exec or Tty from a pane whose directory is a peer's path refuses before making any pane: `exec: <dir>: no such directory`, no `exit 127` pane left
A peer's directory (`/n/peer/x`) is no directory on this host, where the shell starts, so a command there ran in a pane that could only say `(pwd) exit 127`, and a Tty made a new/del pair. missingDir now counts such a path missing, as it does a local directory that is not there. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
-rw-r--r--test/fs.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/fs.py b/test/fs.py
index 0e1e44df..424a67e2 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -467,6 +467,16 @@ def run_file(binary):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
with session(binary, root, 'run') as (client, address):
+ # From a pane on a peer's path no command or terminal starts:
+ # refused before any pane is made, no `exit 127` pane left.
+ peer = new_pane(client, b'')
+ client.write(f'/pane/{peer}/name', b'/n/nosuchpeer/d/f.txt\n')
+ count = len(client.read('/index').splitlines())
+ execute_refused(client, peer, 'ls', 'no such directory')
+ execute_refused(client, peer, 'Tty', 'no such directory')
+ assert len(client.read('/index').splitlines()) == count, client.read('/index')
+ assert b'exit 127' not in client.read('/log')
+ client.remove(f'/pane/{peer}')
client.write('/exec', b'Shell bash\n')
client.write('/exec', b'Tty\n')
term = int(max(r.split()[0] for r in client.read('/index').splitlines() if r.split()[1] == b'term'))