aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYvan Roux <yvan.roux@linaro.org>2018-06-01 06:23:36 +0000
committerYvan Roux <yvan.roux@linaro.org>2018-06-01 06:23:36 +0000
commitab89706ee870304eae8177b1f29c147efc6a0e22 (patch)
treef962a6b3254c2c31c03e938c73b395d5b65c1a85 /test
parent9416a7bef76afcc682bd4e1fccf441aca14a39d3 (diff)
[ASAN] Sanitize testsuite for ARM.
Address failures exhibited by ARMv8 bot in Thumb mode: - Fix logic for fast unwinding support (i.e feature is not available for Thumb) - Fix Unsupported and Requires rules to handle armv8 as well as soft and hard float targets - Un-xfail passing tests Differential Revision: https://reviews.llvm.org/D47575 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@333729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/asan/TestCases/Linux/activation-options.cc1
-rw-r--r--test/asan/TestCases/Linux/allocator_oom_test.cc2
-rw-r--r--test/asan/TestCases/Linux/clang_gcc_abi.cc3
-rw-r--r--test/asan/TestCases/Linux/clone_test.cc1
-rw-r--r--test/asan/TestCases/Posix/glob.cc1
-rw-r--r--test/asan/TestCases/Posix/mmap_limit_mb.cc2
-rw-r--r--test/asan/TestCases/Posix/shared-lib-test.cc1
-rw-r--r--test/asan/TestCases/Posix/stack-use-after-return.cc4
-rw-r--r--test/asan/TestCases/Posix/start-deactivated.cc1
-rw-r--r--test/asan/TestCases/Posix/strndup_oob_test.cc2
-rw-r--r--test/asan/TestCases/Posix/strndup_oob_test2.cc4
-rw-r--r--test/asan/TestCases/heavy_uar_test.cc6
-rw-r--r--test/asan/TestCases/strdup_oob_test.cc2
-rw-r--r--test/asan/lit.cfg2
14 files changed, 13 insertions, 19 deletions
diff --git a/test/asan/TestCases/Linux/activation-options.cc b/test/asan/TestCases/Linux/activation-options.cc
index 1a1ad3f8c..39924c4b1 100644
--- a/test/asan/TestCases/Linux/activation-options.cc
+++ b/test/asan/TestCases/Linux/activation-options.cc
@@ -28,7 +28,6 @@
// RUN: ASAN_ACTIVATION_OPTIONS=include=%t.asan.options.%b %run %t --fix-name 2>&1 | \
// RUN: FileCheck %s --check-prefix=CHECK-HELP --check-prefix=CHECK-FOUND
-// XFAIL: arm-linux-gnueabi
// XFAIL: android
#if !defined(SHARED_LIB)
diff --git a/test/asan/TestCases/Linux/allocator_oom_test.cc b/test/asan/TestCases/Linux/allocator_oom_test.cc
index 69ca07d6d..c450ae5bb 100644
--- a/test/asan/TestCases/Linux/allocator_oom_test.cc
+++ b/test/asan/TestCases/Linux/allocator_oom_test.cc
@@ -32,7 +32,7 @@
// AArch64 bots fail on this test.
// TODO(alekseys): Android lit do not run ulimit on device.
// REQUIRES: shadow-scale-3
-// UNSUPPORTED: s390,android,arm,aarch64
+// UNSUPPORTED: s390,android,aarch64
#include <stdlib.h>
#include <string.h>
diff --git a/test/asan/TestCases/Linux/clang_gcc_abi.cc b/test/asan/TestCases/Linux/clang_gcc_abi.cc
index 79710dc83..e0ae3f1f8 100644
--- a/test/asan/TestCases/Linux/clang_gcc_abi.cc
+++ b/test/asan/TestCases/Linux/clang_gcc_abi.cc
@@ -3,8 +3,7 @@
// RUN: %clangxx_asan -O2 -x c %s -o %t && not %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O3 -x c %s -o %t && not %run %t 2>&1 | FileCheck %s
-// REQUIRES: arm-target-arch, fast-unwinder-works
-// XFAIL: armv7l-unknown-linux-gnueabihf
+// REQUIRES: (arm-target-arch || armhf-target-arch), fast-unwinder-works
#include <stdlib.h>
diff --git a/test/asan/TestCases/Linux/clone_test.cc b/test/asan/TestCases/Linux/clone_test.cc
index f6eb26100..0b86238cc 100644
--- a/test/asan/TestCases/Linux/clone_test.cc
+++ b/test/asan/TestCases/Linux/clone_test.cc
@@ -5,7 +5,6 @@
// RUN: %clangxx_asan -O1 %s -o %t && %run %t | FileCheck %s
// RUN: %clangxx_asan -O2 %s -o %t && %run %t | FileCheck %s
// RUN: %clangxx_asan -O3 %s -o %t && %run %t | FileCheck %s
-// XFAIL: arm-linux-gnueabi
#include <stdio.h>
#include <sched.h>
diff --git a/test/asan/TestCases/Posix/glob.cc b/test/asan/TestCases/Posix/glob.cc
index 46d4a0d8d..16b4ace8e 100644
--- a/test/asan/TestCases/Posix/glob.cc
+++ b/test/asan/TestCases/Posix/glob.cc
@@ -4,7 +4,6 @@
//
// RUN: %clangxx_asan -O0 %s -o %t && %run %t %p 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O3 %s -o %t && %run %t %p 2>&1 | FileCheck %s
-// XFAIL: arm-linux-gnueabi
#include <assert.h>
#include <glob.h>
diff --git a/test/asan/TestCases/Posix/mmap_limit_mb.cc b/test/asan/TestCases/Posix/mmap_limit_mb.cc
index 379524121..508c03fbc 100644
--- a/test/asan/TestCases/Posix/mmap_limit_mb.cc
+++ b/test/asan/TestCases/Posix/mmap_limit_mb.cc
@@ -9,7 +9,7 @@
// RUN: %env_asan_opts=mmap_limit_mb=300 not %run %t 500 1000000 2>&1 | FileCheck %s
//
// FIXME: Windows doesn't implement mmap_limit_mb.
-// XFAIL: arm-linux-gnueabi,win32
+// XFAIL: win32
#include <assert.h>
#include <stdlib.h>
diff --git a/test/asan/TestCases/Posix/shared-lib-test.cc b/test/asan/TestCases/Posix/shared-lib-test.cc
index 305942a07..6de6d9fdf 100644
--- a/test/asan/TestCases/Posix/shared-lib-test.cc
+++ b/test/asan/TestCases/Posix/shared-lib-test.cc
@@ -6,7 +6,6 @@
// RUN: %clangxx_asan -O2 %s %libdl -o %t && not %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O3 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
// RUN: %clangxx_asan -O3 %s %libdl -o %t && not %run %t 2>&1 | FileCheck %s
-// XFAIL: arm-linux-gnueabi
#if !defined(SHARED_LIB)
#include <dlfcn.h>
diff --git a/test/asan/TestCases/Posix/stack-use-after-return.cc b/test/asan/TestCases/Posix/stack-use-after-return.cc
index 2da1a0590..2b9f1d474 100644
--- a/test/asan/TestCases/Posix/stack-use-after-return.cc
+++ b/test/asan/TestCases/Posix/stack-use-after-return.cc
@@ -17,8 +17,8 @@
// This test runs out of stack on AArch64.
// UNSUPPORTED: aarch64
-// FIXME: Fix this test for dynamic runtime on armhf-linux.
-// UNSUPPORTED: armhf-linux && asan-dynamic-runtime
+// FIXME: Fix this test for dynamic runtime on arm linux.
+// UNSUPPORTED: (arm-linux || armhf-linux) && asan-dynamic-runtime
#include <limits.h>
#include <pthread.h>
diff --git a/test/asan/TestCases/Posix/start-deactivated.cc b/test/asan/TestCases/Posix/start-deactivated.cc
index 2870ffb2f..736d7f698 100644
--- a/test/asan/TestCases/Posix/start-deactivated.cc
+++ b/test/asan/TestCases/Posix/start-deactivated.cc
@@ -18,7 +18,6 @@
// RUN: %env_asan_opts=start_deactivated=1 \
// RUN: ASAN_ACTIVATION_OPTIONS=help=1,handle_segv=0,verbosity=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORTED
-// XFAIL: arm-linux-gnueabi
// UNSUPPORTED: ios
// END.
diff --git a/test/asan/TestCases/Posix/strndup_oob_test.cc b/test/asan/TestCases/Posix/strndup_oob_test.cc
index 7ea0b7a33..326ddcfd6 100644
--- a/test/asan/TestCases/Posix/strndup_oob_test.cc
+++ b/test/asan/TestCases/Posix/strndup_oob_test.cc
@@ -7,7 +7,7 @@
// RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
// Unwind problem on arm: "main" is missing from the allocation stack trace.
-// UNSUPPORTED: win32,s390,armv7l-unknown-linux-gnueabihf
+// UNSUPPORTED: win32,s390,arm && !fast-unwinder-works
#include <string.h>
diff --git a/test/asan/TestCases/Posix/strndup_oob_test2.cc b/test/asan/TestCases/Posix/strndup_oob_test2.cc
index 0a1afe285..71f3fc5d7 100644
--- a/test/asan/TestCases/Posix/strndup_oob_test2.cc
+++ b/test/asan/TestCases/Posix/strndup_oob_test2.cc
@@ -7,7 +7,7 @@
// RUN: %clang_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
// Unwind problem on arm: "main" is missing from the allocation stack trace.
-// UNSUPPORTED: win32,s390,armv7l-unknown-linux-gnueabihf
+// UNSUPPORTED: win32,s390,arm && !fast-unwinder-works
#include <string.h>
@@ -19,4 +19,4 @@ int main(int argc, char **argv) {
// CHECK: AddressSanitizer: global-buffer-overflow
// CHECK: {{.*}}main {{.*}}.cc:[[@LINE-2]]
return *copy;
-} \ No newline at end of file
+}
diff --git a/test/asan/TestCases/heavy_uar_test.cc b/test/asan/TestCases/heavy_uar_test.cc
index 9ad29f079..94df0cefc 100644
--- a/test/asan/TestCases/heavy_uar_test.cc
+++ b/test/asan/TestCases/heavy_uar_test.cc
@@ -1,12 +1,12 @@
// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O2 %s -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
-// XFAIL: arm-linux-gnueabi,win32
+// XFAIL: win32
// FIXME: Fix this test under GCC.
// REQUIRES: Clang
-// FIXME: Fix this test for dynamic runtime on armhf-linux.
-// UNSUPPORTED: armhf-linux && asan-dynamic-runtime
+// FIXME: Fix this test for dynamic runtime on arm linux.
+// UNSUPPORTED: (arm-linux || armhf-linux) && asan-dynamic-runtime
// UNSUPPORTED: ios
diff --git a/test/asan/TestCases/strdup_oob_test.cc b/test/asan/TestCases/strdup_oob_test.cc
index 60c5ef12a..e251dfcb4 100644
--- a/test/asan/TestCases/strdup_oob_test.cc
+++ b/test/asan/TestCases/strdup_oob_test.cc
@@ -7,7 +7,7 @@
// RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
// Unwind problem on arm: "main" is missing from the allocation stack trace.
-// UNSUPPORTED: armv7l-unknown-linux-gnueabihf
+// REQUIRES: (arm-target-arch || armhf-target-arch), fast-unwinder-works
// FIXME: We fail to intercept strdup with the dynamic WinASan RTL, so it's not
// in the stack trace.
diff --git a/test/asan/lit.cfg b/test/asan/lit.cfg
index e84abc5d2..6b6595e8d 100644
--- a/test/asan/lit.cfg
+++ b/test/asan/lit.cfg
@@ -168,7 +168,7 @@ config.substitutions.append( ("%libdl", libdl_flag) )
config.available_features.add("asan-" + config.bits + "-bits")
# Fast unwinder doesn't work with Thumb
-if re.search('mthumb', config.target_cflags) is not None:
+if re.search('mthumb', config.target_cflags) is None:
config.available_features.add('fast-unwinder-works')
# Turn on leak detection on 64-bit Linux.