summaryrefslogtreecommitdiff
path: root/test/fs.py
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-11 12:38:56 -0300
committerGabriel Schneider <[email protected]>2026-09-15 17:24:42 -0300
commit682e237df7e8b22f820d14a4adee58e6e2f84268 (patch)
tree5d888cb46f1a49e89fc55e2a4c232d3af0265b1d /test/fs.py
parent6878e1c309172d624c0d7a3555f6f0217ae6770e (diff)
downloadpardes-682e237df7e8b22f820d14a4adee58e6e2f84268.tar.gz
pardes-682e237df7e8b22f820d14a4adee58e6e2f84268.zip
trunk: resume before the Reload experiment
Empty marker on the last pre-Reload change. Keep the Reload experiment on reload (3801914), its first change on reload-start (200a1fc), and the unfinished performance investigation on reload-perf-wip.
Diffstat (limited to 'test/fs.py')
-rw-r--r--test/fs.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/fs.py b/test/fs.py
index 9fc5bcc6..85cf6855 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -17,7 +17,7 @@ from ninep import Client
@contextlib.contextmanager
def session(binary, root, name, *options, socket_name=None, file=None, tty=False, network=None,
- launch=None, inherited=None):
+ launch=None, inherited=None, terminal=None):
env = {key: value for key, value in os.environ.items()
if not key.startswith('PARDES_')}
env.update(HOME=str(root), XDG_RUNTIME_DIR=str(root),
@@ -47,6 +47,9 @@ def session(binary, root, name, *options, socket_name=None, file=None, tty=False
stdout=slave if tty else subprocess.DEVNULL,
stderr=subprocess.PIPE, start_new_session=True,
preexec_fn=preexec)
+ if terminal is not None:
+ # Borrowed handles for input-driving probes, valid inside this context.
+ terminal.update(pid=child.pid, input_fd=master)
if launch is not None and socket_name is None:
address = root / f'pardes-9p-{child.pid}.sock'
if slave is not None:
@@ -77,6 +80,8 @@ def session(binary, root, name, *options, socket_name=None, file=None, tty=False
assert set(network) == {'TCP', 'QUIC'}, network
yield client, address
finally:
+ if terminal is not None:
+ terminal.clear()
if child is not None:
if child.poll() is None:
child.terminate()