kar tests: one temp file per synthetic archive (parallel tests raced on a shared path)

This commit is contained in:
Pavlo Ratushnyi
2026-11-02 22:24:19 +01:00
parent a75238f3fa
commit 767541b0f4
+4 -1
View File
@@ -1645,7 +1645,10 @@ mod row_read_tests {
(x % 0x70) as u8
})
.collect();
let path = std::env::temp_dir().join(format!("leleka-kar-rows-{}-{:x}", std::process::id(), x));
// one file per call: the tests run in parallel and several of them touch, chmod or remove theirs
static NEXT: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
let unique = NEXT.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
let path = std::env::temp_dir().join(format!("leleka-kar-rows-{}-{:x}-{unique}", std::process::id(), x));
File::create(&path).unwrap().write_all(&bytes).unwrap();
let parts = vec![
VerifiedPart { row_base: 0, row_count: n0, scales: scales0, planes: planes0, stride: stride0 },