cloud-hypervisor/test_infra
Rob Bradford 176023156e test_infra: Make guest ID generation multiprocess safe
When using nextest for running tests each test is run in its own process
so the old solution of using a static variable for the guest ID (used to
determine the network segment) no longer works.

Instead use a text file on the filesystem protected with an exclusive
lock. The test process will read from it and then write back the next ID
that can be used. It wraps around at the limit of u8 and skips ID 0.

This function intentionally panics rather than propagate errors as it
should only be called for testing purposes and there the panic handler
will give a useful backtrace and cleanup.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2025-11-17 10:22:34 +00:00
..
src test_infra: Make guest ID generation multiprocess safe 2025-11-17 10:22:34 +00:00
Cargo.toml build: Bump ssh2 from 0.9.4 to 0.9.5 2025-09-11 23:52:25 +00:00