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.""" diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index dbff6b98f0d6..768f1dc2a170 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -64,7 +64,7 @@ rec { wrapProgram $out/bin/nixos-test-driver \ --argv0 ${name} \ - --prefix PATH : "${lib.makeBinPath [ qemu_pkg vde2 netpbm coreutils ]}" \ + --prefix PATH : "${lib.makeBinPath [ qemu_pkg vde2 netpbm coreutils socat ]}" \ ${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin:${imagemagick_tiff}/bin'"} \