nixos/test-driver: abort if we didn't connect to the backdoor in 5 minutes

This is a lot of minutes, but less than the 1 hour it would normally take
to time out the entire build.
This commit is contained in:
K900
2026-06-23 20:59:38 +03:00
parent 17180d0f3d
commit 3aebc40624
@@ -1044,12 +1044,16 @@ class QemuMachine(BaseMachine):
assert self.shell
tic = time.time()
# TODO: do we want to bail after a set number of attempts?
while not shell_ready(timeout_secs=30):
for _ in range(10):
if shell_ready(timeout_secs=30):
break
self.log("Guest root shell did not produce any data yet...")
self.log(
" To debug, enter the VM and run 'systemctl status backdoor.service'."
)
else:
raise RuntimeError("Shell did not start in time")
while True:
chunk = self.shell.recv(1024)