[tests] Fuzz: one fixed credentials folder, rewritten by each run, instead of one per process

This commit is contained in:
2026-11-22 19:05:03 +01:00
parent facf4422c8
commit d058a72ed2
+2 -1
View File
@@ -105,7 +105,8 @@ fn compile_checked(site: &str, hosts: &[(String, String)]) {
fn creds_dir() -> &'static PathBuf {
static DIR: OnceLock<PathBuf> = OnceLock::new();
DIR.get_or_init(|| {
let d = std::env::temp_dir().join(format!("ianitor-fuzz-creds-{}", std::process::id()));
// One fixed folder, rewritten by every run: nothing piles up in the temp folder.
let d = std::env::temp_dir().join("ianitor-fuzz-creds");
std::fs::create_dir_all(&d).unwrap();
std::fs::write(d.join("api_key"), b"fuzz-secret-value\n").unwrap();
std::fs::write(d.join("ui-proof"), b"fuzz-proof-value\n").unwrap();