summaryrefslogtreecommitdiffstats
path: root/nixos/lib/test-driver/test-driver.py
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/lib/test-driver/test-driver.py')
-rw-r--r--nixos/lib/test-driver/test-driver.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py
index 5be741395a08..7f4dd5963c92 100644
--- a/nixos/lib/test-driver/test-driver.py
+++ b/nixos/lib/test-driver/test-driver.py
@@ -462,9 +462,10 @@ class Machine:
Should only be used during test development, not in the production test."""
self.connect()
self.log("Terminal is ready (there is no prompt):")
- telnet = telnetlib.Telnet()
- telnet.sock = self.shell # type: ignore
- telnet.interact()
+ subprocess.run(
+ ["socat", "READLINE", f"FD:{self.shell.fileno()}"],
+ pass_fds=[self.shell.fileno()],
+ )
def succeed(self, *commands: str) -> str:
"""Execute each command and check that it succeeds."""