From 53752b96412f49b0b07923ee0319fb55cdcabde3 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Tue, 20 Oct 2026 16:25:56 -0500 Subject: [PATCH] smite: use /bin/sh in tests for compatibility NixOS has no /bin/true, only /bin/sh. Update the test to use `/bin/sh -c exit` which also immediately exits like /bin/true. --- smite/src/process.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smite/src/process.rs b/smite/src/process.rs index 8f9d9d76..962f7b77 100644 --- a/smite/src/process.rs +++ b/smite/src/process.rs @@ -277,10 +277,10 @@ mod tests { // The ") " in the name checks that parsing skips the whole name. let temp_dir = TempDir::new().unwrap(); let bin = temp_dir.path().join("a) b"); - std::os::unix::fs::symlink("/bin/true", &bin).unwrap(); + std::os::unix::fs::symlink("/bin/sh", &bin).unwrap(); // Left unreaped, the exited child stays a zombie with PF_EXITING set. - let mut child = Command::new(&bin).spawn().unwrap(); + let mut child = Command::new(&bin).args(["-c", "exit"]).spawn().unwrap(); let pid = child.id(); let deadline = Instant::now() + Duration::from_secs(1); while !is_exiting(pid) && Instant::now() < deadline {