about summary refs log tree commit diff
path: root/src/liballoc/tests/string.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-04-09 18:17:22 +0200
committerGitHub <noreply@github.com>2020-04-09 18:17:22 +0200
commit2c3147f018d8b6c05940b66e9f6098737277c882 (patch)
treedab641f94d87557dba0291edc8c852c85f8e6543 /src/liballoc/tests/string.rs
parent7944f39b5f9bb43e47568feea2f8b1bfe101c879 (diff)
parent7060a9e68325f1009d2ffd6c87e00f0f7d013d8e (diff)
downloadrust-2c3147f018d8b6c05940b66e9f6098737277c882.tar.gz
rust-2c3147f018d8b6c05940b66e9f6098737277c882.zip
Rollup merge of #70958 - Amanieu:android_try_reserve, r=Mark-Simulacrum
Disable try_reserve tests on Android

Calling `realloc` with large sizes seems to be broken on older Android versions that use dlmalloc as the default allocator. This is not an issue for modern Android versions that use jemalloc.

Fixes #55861
Diffstat (limited to 'src/liballoc/tests/string.rs')
-rw-r--r--src/liballoc/tests/string.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/tests/string.rs b/src/liballoc/tests/string.rs
index 6e2a5abe90d..9ea020d2d19 100644
--- a/src/liballoc/tests/string.rs
+++ b/src/liballoc/tests/string.rs
@@ -555,6 +555,7 @@ fn test_reserve_exact() {
 
 #[test]
 #[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
+#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
 fn test_try_reserve() {
     // These are the interesting cases:
     // * exactly isize::MAX should never trigger a CapacityOverflow (can be OOM)
@@ -644,6 +645,7 @@ fn test_try_reserve() {
 
 #[test]
 #[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
+#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
 fn test_try_reserve_exact() {
     // This is exactly the same as test_try_reserve with the method changed.
     // See that test for comments.