tri harness scratch --gate has been red on master since 994f3c8a3:
test binaries whose tests share one scratch directory
bootstrap/tests/corpus_zig_bodies.rs 3 tests key t27-corpuscols-{}
bootstrap/tests/corpus_zig_bodies.rs:86 is
let dir = std::env::temp_dir().join(format!("t27-corpuscols-{}", std::process::id()));
A pid is one value per process, so every test in the binary resolves the same
directory, and the test that uses it ends with remove_dir_all(&dir).
What is measured, and what is not. Only one of the three tests in that file
creates or deletes the directory today, so there is no collision on this tree --
the gate is structural, and correctly so: the second test to use that key would
collide, and it would pass the first time it ran.
The fix is the one the gate's own message prescribes: key by an AtomicUsize
counter, unique per call, rather than by the pid.
Master runs: 994f3c8a3 failure, 494265fbb success, d7fdb4f1d success.
tri harness scratch --gatehas been red on master since994f3c8a3:bootstrap/tests/corpus_zig_bodies.rs:86isA pid is one value per process, so every test in the binary resolves the same
directory, and the test that uses it ends with
remove_dir_all(&dir).What is measured, and what is not. Only one of the three tests in that file
creates or deletes the directory today, so there is no collision on this tree --
the gate is structural, and correctly so: the second test to use that key would
collide, and it would pass the first time it ran.
The fix is the one the gate's own message prescribes: key by an
AtomicUsizecounter, unique per call, rather than by the pid.
Master runs:
994f3c8a3failure,494265fbbsuccess,d7fdb4f1dsuccess.