Only run mallopt_smoke test on bionic.
Even though glibc has mallopt, there is no way to guarantee that
we use an invalid argument. Since this test is only really useful
for bionic, only run it on bionic.
Test: Ran glibc and verified the test is skipped.
Change-Id: If991e8804b21c83f3d7e3b15a0b60e48da331567
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp
index 3cc5bbd..e90a824 100644
--- a/tests/malloc_test.cpp
+++ b/tests/malloc_test.cpp
@@ -661,13 +661,13 @@
}
TEST(malloc, mallopt_smoke) {
-#if !defined(ANDROID_HOST_MUSL)
+#if defined(__BIONIC__)
errno = 0;
ASSERT_EQ(0, mallopt(-1000, 1));
// mallopt doesn't set errno.
ASSERT_EQ(0, errno);
#else
- GTEST_SKIP() << "musl doesn't have mallopt";
+ GTEST_SKIP() << "bionic-only test";
#endif
}