1--- tests/sharded_lock.rs 2+++ tests/sharded_lock.rs 3@@ -46,6 +46,8 @@ fn frob() { 4 } 5 6 #[test] 7+// Android aborts on panic and this test relies on stack unwinding. 8+#[cfg(not(target_os = "android"))] 9 fn arc_poison_wr() { 10 let arc = Arc::new(ShardedLock::new(1)); 11 let arc2 = arc.clone(); 12@@ -58,6 +60,8 @@ fn arc_poison_wr() { 13 } 14 15 #[test] 16+// Android aborts on panic and this test relies on stack unwinding. 17+#[cfg(not(target_os = "android"))] 18 fn arc_poison_ww() { 19 let arc = Arc::new(ShardedLock::new(1)); 20 assert!(!arc.is_poisoned()); 21@@ -72,6 +76,8 @@ fn arc_poison_ww() { 22 } 23 24 #[test] 25+// Android aborts on panic and this test relies on stack unwinding. 26+#[cfg(not(target_os = "android"))] 27 fn arc_no_poison_rr() { 28 let arc = Arc::new(ShardedLock::new(1)); 29 let arc2 = arc.clone(); 30@@ -84,6 +90,8 @@ fn arc_no_poison_rr() { 31 assert_eq!(*lock, 1); 32 } 33 #[test] 34+// Android aborts on panic and this test relies on stack unwinding. 35+#[cfg(not(target_os = "android"))] 36 fn arc_no_poison_sl() { 37 let arc = Arc::new(ShardedLock::new(1)); 38 let arc2 = arc.clone(); 39@@ -135,6 +143,8 @@ fn arc() { 40 } 41 42 #[test] 43+// Android aborts on panic and this test relies on stack unwinding. 44+#[cfg(not(target_os = "android"))] 45 fn arc_access_in_unwind() { 46 let arc = Arc::new(ShardedLock::new(1)); 47 let arc2 = arc.clone(); 48@@ -211,6 +221,8 @@ fn test_into_inner_drop() { 49 } 50 51 #[test] 52+// Android aborts on panic and this test relies on stack unwinding. 53+#[cfg(not(target_os = "android"))] 54 fn test_into_inner_poison() { 55 let m = Arc::new(ShardedLock::new(NonCopy(10))); 56 let m2 = m.clone(); 57@@ -235,6 +247,8 @@ fn test_get_mut() { 58 } 59 60 #[test] 61+// Android aborts on panic and this test relies on stack unwinding. 62+#[cfg(not(target_os = "android"))] 63 fn test_get_mut_poison() { 64 let m = Arc::new(ShardedLock::new(NonCopy(10))); 65 let m2 = m.clone(); 66--- tests/thread.rs 67+++ tests/thread.rs 68@@ -9,6 +9,8 @@ const THREADS: usize = 10; 69 const SMALL_STACK_SIZE: usize = 20; 70 71 #[test] 72+// Android aborts on panic and this test relies on stack unwinding. 73+#[cfg(not(target_os = "android"))] 74 fn join() { 75 let counter = AtomicUsize::new(0); 76 thread::scope(|scope| { 77@@ -64,6 +66,8 @@ fn counter_builder() { 78 } 79 80 #[test] 81+// Android aborts on panic and this test relies on stack unwinding. 82+#[cfg(not(target_os = "android"))] 83 fn counter_panic() { 84 let counter = AtomicUsize::new(0); 85 let result = thread::scope(|scope| { 86@@ -84,6 +88,8 @@ fn counter_panic() { 87 } 88 89 #[test] 90+// Android aborts on panic and this test relies on stack unwinding. 91+#[cfg(not(target_os = "android"))] 92 fn panic_twice() { 93 let result = thread::scope(|scope| { 94 scope.spawn(|_| { 95@@ -108,6 +114,8 @@ fn panic_twice() { 96 } 97 98 #[test] 99+// Android aborts on panic and this test relies on stack unwinding. 100+#[cfg(not(target_os = "android"))] 101 fn panic_many() { 102 let result = thread::scope(|scope| { 103 scope.spawn(|_| panic!("deliberate panic #1")); 104