1 parent f3ca5a8 commit a502611Copy full SHA for a502611
1 file changed
crates/fspy/tests/static_executable.rs
@@ -25,12 +25,14 @@ fn test_bin_path() -> &'static Path {
25
.expect("failed to set permissions on test binary");
26
27
// Verify that the test binary is indeed a static executable
28
- let output = std::process::Command::new("ldd")
29
- .arg(&test_bin_path)
30
- .output()
31
- .expect("failed to run ldd");
32
- let stderr = from_utf8(&output.stderr).unwrap().trim();
33
- assert_eq!(stderr, "not a dynamic executable");
+ let output = std::process::Command::new("ldd").arg(&test_bin_path).output().unwrap();
+ assert_eq!(
+ output.status.code(),
+ Some(1),
+ "ldd should fail on static executables. Stdout: {}. Stderr: {}",
+ from_utf8(&output.stdout).unwrap(),
34
+ from_utf8(&output.stderr).unwrap()
35
+ );
36
37
test_bin_path
38
});
0 commit comments