diff options
| author | tv <tv@krebsco.de> | 2026-11-13 15:22:40 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-13 15:22:40 +0000 |
| commit | 4afd7d2793e85f260a2a3c20a423f0d1a4844ea7 (patch) | |
| tree | ce7c870fcb522fb79ce59ad27338293b4e4aa8eb /tests/vm.nix | |
| parent | c3a8699c72c0a67d3890b3a0ab52254dc5b4de87 (diff) | |
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.
Diffstat (limited to 'tests/vm.nix')
| -rw-r--r-- | tests/vm.nix | 6 |
1 files 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']} </dev/null 2>&1", timeout=900, ) if phase["interrupt"] is not None: |
