gperftools/skip-heapchecker-in-arm-arch.patch
Ni Cunshu e55870e020 Upgrade to 2.15
Signed-off-by: Ni Cunshu <nicunshu@huawei.com>
2024-02-06 21:26:37 +08:00

47 lines
1.5 KiB
Diff

From 0329adf56e817636e4bd19cb980c07f47c481c42 Mon Sep 17 00:00:00 2001
From: zhangyiru <zhangyiru3@huawei.com>
Date: Wed, 20 Oct 2021 11:22:59 -0400
Subject: [PATCH] skip heapchecker in arm arch
arm do not have fully functional heap checker, so skip these three
testcases.
Signed-off-by: zhangyiru <zhangyiru3@huawei.com>
---
src/tests/heap-checker-death_unittest.sh | 5 +++++
src/tests/heap-checker_unittest.cc | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/src/tests/heap-checker-death_unittest.sh b/src/tests/heap-checker-death_unittest.sh
index 69db0c9..deac493 100755
--- a/src/tests/heap-checker-death_unittest.sh
+++ b/src/tests/heap-checker-death_unittest.sh
@@ -34,6 +34,11 @@
# Run the heap checker unittest in a mode where it is supposed to crash and
# return an error if it doesn't.
+arch=$(uname -r | grep x86)
+if [[ $arch == "" ]]; then
+# skip this test, libtool define EXIT_SKIP=77
+ exit 77
+fi
# We expect BINDIR to be set in the environment.
# If not, we set it to some reasonable value.
BINDIR="${BINDIR:-.}"
diff --git a/src/tests/heap-checker_unittest.cc b/src/tests/heap-checker_unittest.cc
index 9a7086c..be483fe 100644
--- a/src/tests/heap-checker_unittest.cc
+++ b/src/tests/heap-checker_unittest.cc
@@ -1412,6 +1412,10 @@ bool spawn_subtest(const char* mode, char** argv) {
}
int main(int argc, char** argv) {
+#if defined(__aarch64__)
+ printf("ARM SKIP\n");
+ exit(77);
+#endif
if (getenv("HEAPCHECK") == nullptr) {
CHECK(!HeapLeakChecker::IsActive());
--
2.33.0