--- tests/sharded_lock.rs | 14 ++++++++++++++ tests/thread.rs | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git b/tests/sharded_lock.rs a/tests/sharded_lock.rs index 002f7f5e..8b0ae8e1 100644 --- b/tests/sharded_lock.rs +++ a/tests/sharded_lock.rs @@ -49,6 +49,8 @@ fn frob() { } #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn arc_poison_wr() { let arc = Arc::new(ShardedLock::new(1)); let arc2 = arc.clone(); @@ -61,6 +63,8 @@ fn arc_poison_wr() { } #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn arc_poison_ww() { let arc = Arc::new(ShardedLock::new(1)); assert!(!arc.is_poisoned()); @@ -75,6 +79,8 @@ fn arc_poison_ww() { } #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn arc_no_poison_rr() { let arc = Arc::new(ShardedLock::new(1)); let arc2 = arc.clone(); @@ -87,6 +93,8 @@ fn arc_no_poison_rr() { assert_eq!(*lock, 1); } #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn arc_no_poison_sl() { let arc = Arc::new(ShardedLock::new(1)); let arc2 = arc.clone(); @@ -138,6 +146,8 @@ fn arc() { } #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn arc_access_in_unwind() { let arc = Arc::new(ShardedLock::new(1)); let arc2 = arc.clone(); @@ -211,6 +221,8 @@ fn test_into_inner_drop() { } #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn test_into_inner_poison() { let m = Arc::new(ShardedLock::new(NonCopy(10))); let m2 = m.clone(); @@ -235,6 +247,8 @@ fn test_get_mut() { } #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn test_get_mut_poison() { let m = Arc::new(ShardedLock::new(NonCopy(10))); let m2 = m.clone(); diff --git b/tests/thread.rs a/tests/thread.rs index 0dfad90b..280b73f0 100644 --- b/tests/thread.rs +++ a/tests/thread.rs @@ -9,6 +9,8 @@ const THREADS: usize = 10; const SMALL_STACK_SIZE: usize = 20; #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn join() { let counter = AtomicUsize::new(0); thread::scope(|scope| { @@ -64,6 +66,8 @@ fn counter_builder() { } #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn counter_panic() { let counter = AtomicUsize::new(0); let result = thread::scope(|scope| { @@ -84,6 +88,8 @@ fn counter_panic() { } #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn panic_twice() { let result = thread::scope(|scope| { scope.spawn(|_| { @@ -108,6 +114,8 @@ fn panic_twice() { } #[test] +// Android aborts on panic and this test relies on stack unwinding. +#[cfg(not(target_os = "android"))] fn panic_many() { let result = thread::scope(|scope| { scope.spawn(|_| panic!("deliberate panic #1"));