From 8122d4827c57e21c6b23b248d577076a51054800 Mon Sep 17 00:00:00 2001 From: Jacob Stephens Date: Wed, 11 Nov 2026 02:52:52 -0500 Subject: [PATCH] Fix executable-copy race in Console update tests Copy the private installed binary through the existing child-process helper so parallel test forks cannot inherit its writable descriptor and cause ETXTBSY during token creation. Validated the recorded panic with a controlled inherited-writer probe: failed twice before the change and passed afterward. The full update suite passed 20 consecutive parallel runs. scripts/affected-tests main passed all 4213 tests in 2889.35 seconds including compilation. cargo fmt --check and git diff --check also passed. --- tests/update/console.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/update/console.rs b/tests/update/console.rs index 2ae3b278e..00d388b3c 100644 --- a/tests/update/console.rs +++ b/tests/update/console.rs @@ -34,7 +34,7 @@ fn update(fleet: bool) { let install = scenario.path("installed"); fs::create_dir(&install).unwrap(); let binary = install.join("thirdshift"); - fs::copy(env!("CARGO_BIN_EXE_thirdshift"), &binary).unwrap(); + support::copy_executable(Path::new(env!("CARGO_BIN_EXE_thirdshift")), &binary); write_install_receipt(&scenario, &install); let token = Command::new(&binary) .env("HOME", &home)