From 4afd7d2793e85f260a2a3c20a423f0d1a4844ea7 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 13 Nov 2026 15:22:40 +0000 Subject: tests: run populate with /dev/null as input The test driver runs commands in a shell whose input is the console it talks through, /dev/hvc0, which is a terminal. ssh -t, which writeDeploy's allocateTTY passes for remote targets, allocates a terminal then, and reads the console, so the deploy-*-allocateTTY scenarios of remote and sudo targets hang. Populate and writeDeploy read nothing, so their input is /dev/null, and ssh allocates no terminal, as these scenarios expect. --- tests/vm.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/vm.nix b/tests/vm.nix index 906bb09..d7b2f60 100644 --- a/tests/vm.nix +++ b/tests/vm.nix @@ -150,10 +150,12 @@ in pkgs.testers.runNixOSTest { run(deployer, f"sh {scenario['prepareDeployer']}") run(node, f"sh {scenario['prepare']}") for i, phase in enumerate(scenario["phases"]): - # A hang fails the scenario, not the whole test. + # A hang fails the scenario, not the whole test. The + # input is the console the test driver talks through, + # a terminal, which ssh -t would take over. limit = phase["interrupt"] or 600 status, out = deployer.execute( - f"env HOME=/root {phase['env']} timeout {limit} {phase['populate']} 2>&1", + f"env HOME=/root {phase['env']} timeout {limit} {phase['populate']} &1", timeout=900, ) if phase["interrupt"] is not None: -- cgit v1.3.1