Skip to content

Commit 832594e

Browse files
committed
test: skip testing error cases under QEMU
1 parent 1aa9d05 commit 832594e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/test_spawn.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ fn spawn_sleep() {
8888
}
8989

9090
#[test]
91+
// `posix_spawn(path_not_exist)` succeeds under QEMU, so ignore the test. No need
92+
// to investigate the root cause, this test still works in native environments, which
93+
// is sufficient to test the binding.
94+
#[cfg_attr(qemu, ignore)]
9195
fn spawn_cmd_does_not_exist() {
9296
let _guard = FORK_MTX.lock();
9397

@@ -167,6 +171,10 @@ fn spawnp_sleep() {
167171
}
168172

169173
#[test]
174+
// `posix_spawnp(bin_not_exist)` succeeds under QEMU, so ignore the test. No need
175+
// to investigate the root cause, this test still works in native environments, which
176+
// is sufficient to test the binding.
177+
#[cfg_attr(qemu, ignore)]
170178
fn spawnp_cmd_does_not_exist() {
171179
let _guard = FORK_MTX.lock();
172180

0 commit comments

Comments
 (0)