Skip to content

Commit cb6178c

Browse files
committed
try make preemptive tests more stable
1 parent 9c92311 commit cb6178c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/tests/coroutine.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ fn coroutine_stack_growth() -> std::io::Result<()> {
114114
Ok(())
115115
}
116116

117+
#[cfg(not(all(target_os = "linux", target_arch = "x86", feature = "preemptive")))]
117118
#[test]
118119
fn coroutine_trap() -> std::io::Result<()> {
119120
let mut coroutine = co!(|_: &Suspender<'_, (), ()>, ()| {
@@ -130,7 +131,10 @@ fn coroutine_trap() -> std::io::Result<()> {
130131
Ok(())
131132
}
132133

133-
#[cfg(not(debug_assertions))]
134+
#[cfg(not(any(
135+
debug_assertions,
136+
all(target_os = "linux", target_arch = "x86", feature = "preemptive")
137+
)))]
134138
#[test]
135139
fn coroutine_invalid_memory_reference() -> std::io::Result<()> {
136140
let mut coroutine = co!(|_: &Suspender<'_, (), ()>, ()| {

0 commit comments

Comments
 (0)