aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2022-04-15 15:54:47 -0700
committerFlorian Mayer <fmayer@google.com>2022-04-15 16:14:56 -0700
commit750dcd326e79f5db71851b1b001c45e02eb290ea (patch)
treed872e9666860777fba2a1893b9fcf8b14710bf3a
parentdb0648ae1d0f9ff5e019e9f2fd1b3964349c6b3b (diff)
downloadbionic-750dcd326e79f5db71851b1b001c45e02eb290ea.tar.gz
Use SKIP_WITH_HWASAN macro from libbase.
Change-Id: I83681d2191bf4184e52d84d1107d61065927bb24
-rw-r--r--libc/malloc_debug/Android.bp1
-rw-r--r--libc/malloc_debug/tests/malloc_debug_system_tests.cpp1
-rw-r--r--libc/malloc_debug/tests/malloc_debug_unit_tests.cpp2
-rw-r--r--libc/malloc_hooks/tests/malloc_hooks_tests.cpp1
-rw-r--r--tests/dl_test.cpp1
-rw-r--r--tests/getcwd_test.cpp2
-rw-r--r--tests/heap_tagging_level_test.cpp1
-rw-r--r--tests/malloc_iterate_test.cpp1
-rw-r--r--tests/malloc_test.cpp1
-rw-r--r--tests/stdlib_test.cpp1
-rw-r--r--tests/utils.h8
11 files changed, 10 insertions, 10 deletions
diff --git a/libc/malloc_debug/Android.bp b/libc/malloc_debug/Android.bp
index 5aea771d9..7ff3db204 100644
--- a/libc/malloc_debug/Android.bp
+++ b/libc/malloc_debug/Android.bp
@@ -133,7 +133,6 @@ cc_test {
include_dirs: [
"bionic/libc",
"bionic/libc/async_safe/include",
- "bionic", // For SKIP_WITH_HWASAN.
],
header_libs: [
diff --git a/libc/malloc_debug/tests/malloc_debug_system_tests.cpp b/libc/malloc_debug/tests/malloc_debug_system_tests.cpp
index 584370206..92679e48b 100644
--- a/libc/malloc_debug/tests/malloc_debug_system_tests.cpp
+++ b/libc/malloc_debug/tests/malloc_debug_system_tests.cpp
@@ -41,6 +41,7 @@
#include <android-base/file.h>
#include <android-base/stringprintf.h>
+#include <android-base/test_utils.h>
#include <gtest/gtest.h>
#include <log/log_read.h>
diff --git a/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp b/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp
index 84f0645b2..ea2dc7880 100644
--- a/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp
+++ b/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp
@@ -40,10 +40,10 @@
#include <android-base/file.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
+#include <android-base/test_utils.h>
#include <platform/bionic/macros.h>
#include <private/bionic_malloc_dispatch.h>
-#include <tests/utils.h>
#include <unwindstack/Unwinder.h>
diff --git a/libc/malloc_hooks/tests/malloc_hooks_tests.cpp b/libc/malloc_hooks/tests/malloc_hooks_tests.cpp
index d16270fc6..3ff2537c3 100644
--- a/libc/malloc_hooks/tests/malloc_hooks_tests.cpp
+++ b/libc/malloc_hooks/tests/malloc_hooks_tests.cpp
@@ -38,6 +38,7 @@
#include <gtest/gtest.h>
+#include <android-base/test_utils.h>
#include <bionic/malloc.h>
#include <private/bionic_malloc_dispatch.h>
#include <tests/utils.h>
diff --git a/tests/dl_test.cpp b/tests/dl_test.cpp
index bf32bd549..a61586b04 100644
--- a/tests/dl_test.cpp
+++ b/tests/dl_test.cpp
@@ -34,6 +34,7 @@
#include "gtest_globals.h"
#include <android-base/file.h>
+#include <android-base/test_utils.h>
#include "utils.h"
extern "C" int main_global_default_serial() {
diff --git a/tests/getcwd_test.cpp b/tests/getcwd_test.cpp
index 97b1d4f29..4fec40bae 100644
--- a/tests/getcwd_test.cpp
+++ b/tests/getcwd_test.cpp
@@ -20,6 +20,8 @@
#include <limits.h>
#include <unistd.h>
+#include <android-base/test_utils.h>
+
#include "utils.h"
TEST(getcwd, auto_full) {
diff --git a/tests/heap_tagging_level_test.cpp b/tests/heap_tagging_level_test.cpp
index c493e1de0..96c2ffd0b 100644
--- a/tests/heap_tagging_level_test.cpp
+++ b/tests/heap_tagging_level_test.cpp
@@ -26,6 +26,7 @@
#include "SignalUtils.h"
+#include <android-base/test_utils.h>
#include <bionic/malloc_tagged_pointers.h>
static bool KernelSupportsTaggedPointers() {
diff --git a/tests/malloc_iterate_test.cpp b/tests/malloc_iterate_test.cpp
index e896c90f4..297f637c6 100644
--- a/tests/malloc_iterate_test.cpp
+++ b/tests/malloc_iterate_test.cpp
@@ -26,6 +26,7 @@
#include <vector>
+#include <android-base/test_utils.h>
#include <async_safe/log.h>
#include <procinfo/process_map.h>
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp
index f157ec497..1b875cdf1 100644
--- a/tests/malloc_test.cpp
+++ b/tests/malloc_test.cpp
@@ -41,6 +41,7 @@
#include <tinyxml2.h>
#include <android-base/file.h>
+#include <android-base/test_utils.h>
#include "utils.h"
diff --git a/tests/stdlib_test.cpp b/tests/stdlib_test.cpp
index 6dbd74167..465e61a7f 100644
--- a/tests/stdlib_test.cpp
+++ b/tests/stdlib_test.cpp
@@ -33,6 +33,7 @@
#include <android-base/file.h>
#include <android-base/macros.h>
#include <android-base/silent_death_test.h>
+#include <android-base/test_utils.h>
#include <gtest/gtest.h>
#include "math_data_test.h"
diff --git a/tests/utils.h b/tests/utils.h
index 284140a0d..a62dde612 100644
--- a/tests/utils.h
+++ b/tests/utils.h
@@ -69,14 +69,6 @@ static inline bool have_dl() {
return (dlopen("libc.so", 0) != nullptr);
}
-extern "C" void __hwasan_init() __attribute__((weak));
-
-static inline bool running_with_hwasan() {
- return &__hwasan_init != 0;
-}
-
-#define SKIP_WITH_HWASAN if (running_with_hwasan()) GTEST_SKIP()
-
static inline bool running_with_native_bridge() {
#if defined(__BIONIC__)
static const prop_info* pi = __system_property_find("ro.dalvik.vm.isa." ABI_STRING);