From cb6178c2583c5723078b8c1e5b3b77ff2a130da8 Mon Sep 17 00:00:00 2001 From: dragon-zhang Date: Mon, 25 Nov 2024 09:55:18 +0800 Subject: [PATCH] try make preemptive tests more stable --- core/tests/coroutine.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/tests/coroutine.rs b/core/tests/coroutine.rs index c08693a6..364eacb5 100644 --- a/core/tests/coroutine.rs +++ b/core/tests/coroutine.rs @@ -114,6 +114,7 @@ fn coroutine_stack_growth() -> std::io::Result<()> { Ok(()) } +#[cfg(not(all(target_os = "linux", target_arch = "x86", feature = "preemptive")))] #[test] fn coroutine_trap() -> std::io::Result<()> { let mut coroutine = co!(|_: &Suspender<'_, (), ()>, ()| { @@ -130,7 +131,10 @@ fn coroutine_trap() -> std::io::Result<()> { Ok(()) } -#[cfg(not(debug_assertions))] +#[cfg(not(any( + debug_assertions, + all(target_os = "linux", target_arch = "x86", feature = "preemptive") +)))] #[test] fn coroutine_invalid_memory_reference() -> std::io::Result<()> { let mut coroutine = co!(|_: &Suspender<'_, (), ()>, ()| {