Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bootstrap/tests/corpus_zig_bodies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ fn per_spec_carries_three_zig_digits_and_says_so_in_its_header() {
eprintln!("zig not on PATH -- SKIPPED");
return;
}
let dir = std::env::temp_dir().join(format!("t27-corpuscols-{}", std::process::id()));
// Unique per CALL, not per process: a pid is one value for the whole test
// binary, so every test in this file would resolve the same directory and
// the `remove_dir_all` below would erase a sibling's input mid-read.
static NTH: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
let nth = NTH.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
let dir = std::env::temp_dir().join(format!("t27-corpuscols-{}-{nth}", std::process::id()));
std::fs::create_dir_all(&dir).expect("temp dir");
let path = dir.join("per-spec.txt");
let out = Command::new(env!("CARGO_BIN_EXE_t27c"))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# NOW -- The scratch gate went red on master the hour it was wired (2026-08-31)

## The scratch gate went red on master the hour it was wired (Closes #2968)

- tri harness scratch --gate has been red on master since 994f3c8a3: bootstrap/tests/corpus_zig_bodies.rs keys its scratch directory by std::process::id(), which is one value for the whole test binary.
- Measured, and stated as measured: only one of that file's three tests creates or deletes the directory today, so nothing collides on this tree. The gate is structural, and right to be -- the second test to use that key would collide, and would pass the first time it ran.
- Fixed as the gate's own message prescribes: an AtomicUsize counter, unique per call. Gate now prints none and exits 0; the three tests still pass.
- The gate found this within an hour of being wired, on a file written after it. That is the reading worth keeping: it went red on new code rather than on history.
Loading