diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-22 20:12:14 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-22 20:12:14 -0500 |
| commit | 0f8bbc7c1e2c2f6fec0b17753ac0d9c4a3ad4317 (patch) | |
| tree | 3a2015786254ac90610e221f26517aaf58e7ff26 /docs | |
| parent | 0a57d75d3947fddd6c6ab62924c52a456f4776b0 (diff) | |
| download | archangel-0f8bbc7c1e2c2f6fec0b17753ac0d9c4a3ad4317.tar.gz archangel-0f8bbc7c1e2c2f6fec0b17753ac0d9c4a3ad4317.zip | |
fix(test): fail clearly when the VM forward port is taken
A test run launched qemu without first checking the SSH forward port, so a collision with another VM already holding it surfaced only as an opaque "Failed to start VM," with qemu unable to bind and no hint why. I added a port_in_use check in run_test before the launch: it errors with the port number and the SSH_PORT override to set, records the failure, and moves on.
The check lives in run_test, not start_vm, because start_vm runs in a command substitution (vm_pid=$(start_vm ...)) where this harness's non-exiting error() would be captured as the PID instead of failing the run. The pure half, port_listening_in, takes an `ss -tln` snapshot as a string so it's unit-testable.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
