From 5d1cf5e5165aad5ab59877a2297647580672da45 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Fri, 16 May 2014 20:12:27 +0000 Subject: [PATCH] Exclude several ASan tests from test suite if we're using GCC git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209013 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/asan/TestCases/Linux/asan_prelink_test.cc | 3 ++- test/asan/TestCases/Linux/heavy_uar_test.cc | 3 +++ test/asan/TestCases/Linux/odr-violation.cc | 3 +++ test/asan/TestCases/Linux/preinit_test.cc | 3 +++ test/asan/TestCases/heap-overflow.cc | 4 ++++ test/lit.common.cfg | 2 ++ 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/test/asan/TestCases/Linux/asan_prelink_test.cc b/test/asan/TestCases/Linux/asan_prelink_test.cc index 798a542fa..6145c01f7 100644 --- a/test/asan/TestCases/Linux/asan_prelink_test.cc +++ b/test/asan/TestCases/Linux/asan_prelink_test.cc @@ -9,7 +9,8 @@ // RUN: %clangxx_asan %t.o %t.so -Wl,-R. -o %t // RUN: ASAN_OPTIONS=verbosity=1 %run %t 2>&1 | FileCheck %s -// REQUIRES: x86_64-supported-target, asan-64-bits +// GNU driver doesn't handle .so files properly. +// REQUIRES: x86_64-supported-target, asan-64-bits, Clang #if BUILD_SO int G; int *getG() { diff --git a/test/asan/TestCases/Linux/heavy_uar_test.cc b/test/asan/TestCases/Linux/heavy_uar_test.cc index 594aa0545..cedd69d0a 100644 --- a/test/asan/TestCases/Linux/heavy_uar_test.cc +++ b/test/asan/TestCases/Linux/heavy_uar_test.cc @@ -4,6 +4,9 @@ // RUN: %clangxx_asan -O2 %s -o %t && \ // RUN: not %run %t 2>&1 | FileCheck %s +// FIXME: Fix this test under GCC. +// REQUIRES: Clang + #include #include #include diff --git a/test/asan/TestCases/Linux/odr-violation.cc b/test/asan/TestCases/Linux/odr-violation.cc index cd07c72e9..91fa6d558 100644 --- a/test/asan/TestCases/Linux/odr-violation.cc +++ b/test/asan/TestCases/Linux/odr-violation.cc @@ -11,6 +11,9 @@ // RUN: ASAN_OPTIONS=detect_odr_violation=1 %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED // RUN: ASAN_OPTIONS=detect_odr_violation=2 not %run %t 2>&1 | FileCheck %s +// GNU driver doesn't handle .so files properly. +// REQUIRES: Clang + #ifndef SZ # define SZ 4 #endif diff --git a/test/asan/TestCases/Linux/preinit_test.cc b/test/asan/TestCases/Linux/preinit_test.cc index 4444c1ca4..ab62d6327 100644 --- a/test/asan/TestCases/Linux/preinit_test.cc +++ b/test/asan/TestCases/Linux/preinit_test.cc @@ -2,6 +2,9 @@ // RUN: %clangxx_asan -DFUNC=main %s -o %t -Wl,-R. %t.so // RUN: %run %t +// GNU driver doesn't handle .so files properly. +// REQUIRES: Clang + // This test ensures that we call __asan_init early enough. // We build a shared library w/o asan instrumentation // and the binary with asan instrumentation. diff --git a/test/asan/TestCases/heap-overflow.cc b/test/asan/TestCases/heap-overflow.cc index 1a5098a34..d5797dc91 100644 --- a/test/asan/TestCases/heap-overflow.cc +++ b/test/asan/TestCases/heap-overflow.cc @@ -3,6 +3,10 @@ // RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s // RUN: ASAN_OPTIONS=print_stats=1 not %run %t 2>&1 | FileCheck %s + +// FIXME: Fix this test under GCC. +// REQUIRES: Clang + #include #include int main(int argc, char **argv) { diff --git a/test/lit.common.cfg b/test/lit.common.cfg index 4bfca2e13..5366073be 100644 --- a/test/lit.common.cfg +++ b/test/lit.common.cfg @@ -28,6 +28,8 @@ elif compiler_id == 'GNU': config.cxx_mode_flags = ["-x c++"] else: lit_config.fatal("Unsupported compiler id: %r" % compiler_id) +# Add compiler ID to the list of available features. +config.available_features.add(compiler_id) # Clear some environment variables that might affect Clang. possibly_dangerous_env_vars = ['COMPILER_PATH', 'RC_DEBUG_OPTIONS', -- 2.11.4.GIT