KTSTR_ORCHESTRATED_ENV

Constant KTSTR_ORCHESTRATED_ENV 

Source
pub const KTSTR_ORCHESTRATED_ENV: &str = "KTSTR_ORCHESTRATED";
Expand description

Name of the environment variable cargo-ktstr sets to signal “this test process was launched by a cargo-ktstr orchestration path, not raw cargo nextest”. cargo-ktstr’s test and verifier subcommands set it to "1" before spawning the nextest child; the value content does not matter, only the presence — std::env::var(KTSTR_ORCHESTRATED_ENV).is_ok().

Tests that boot real KVM VMs (src/vmm/* integration tests) use this signal to skip when an operator runs the test binary directly via cargo nextest run --lib. Raw nextest fans 7000+ tests at full host parallelism, which starves the per-VM resource budgets these tests depend on (KVM page allocation, vCPU thread scheduling, freeze rendezvous timing). Failure shape is kill set by AP + watchdog-deadline timeout shortly after VM start. cargo-ktstr’s orchestrator constrains the VM-test concurrency so the budgets hold; raw nextest doesn’t, so the skip surfaces operator-error (wrong runner) rather than dismissing a real bug.

KTSTR_KERNEL_ENV alone is not sufficient: an operator may have it set in their shell from a prior cargo-ktstr session and then invoke raw nextest. The dedicated orchestration marker discriminates the two cases.