[tests] Remove "supported-target" in favor of "target-arch" lit features.
authorAlexey Samsonov <vonosmas@gmail.com>
Tue, 23 Feb 2016 01:58:56 +0000 (01:58 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Tue, 23 Feb 2016 01:58:56 +0000 (01:58 +0000)
Test cases definitely should not care about the complete set of architectures
supported by compiler-rt - they should only care about current
architecture that the test suite was configured for.

Introduce new lit feature to reflect this, and convert tests to use it.

llvm-svn: 261603

22 files changed:
compiler-rt/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc
compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc
compiler-rt/test/asan/TestCases/Linux/clang_gcc_abi.cc
compiler-rt/test/asan/TestCases/Linux/coverage-missing.cc
compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.c
compiler-rt/test/asan/TestCases/Linux/kernel-area.cc
compiler-rt/test/asan/TestCases/Linux/malloc-in-qsort.cc
compiler-rt/test/asan/TestCases/Linux/nohugepage_test.cc
compiler-rt/test/asan/TestCases/Linux/odr_c_test.c
compiler-rt/test/asan/TestCases/Linux/overflow-in-qsort.cc
compiler-rt/test/asan/TestCases/Linux/scariness_score_test.cc
compiler-rt/test/asan/TestCases/Linux/swapcontext_test.cc
compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cc
compiler-rt/test/asan/TestCases/Posix/dlclose-test.cc
compiler-rt/test/asan/TestCases/debug_ppc64_mapping.cc
compiler-rt/test/asan/TestCases/dump_instruction_bytes.cc
compiler-rt/test/lit.common.cfg
compiler-rt/test/lit.common.configured.in
compiler-rt/test/msan/vector_cvt.cc
compiler-rt/test/sanitizer_common/TestCases/Linux/fpe.cc
compiler-rt/test/sanitizer_common/TestCases/Linux/ill.cc
compiler-rt/test/sanitizer_common/TestCases/Linux/open_memstream.cc

index 5332c99..cbc900d 100644 (file)
@@ -1,7 +1,7 @@
 // Check that a stack unwinding algorithm works corretly even with the assembly
 // instrumentation.
 
-// REQUIRES: x86_64-supported-target
+// REQUIRES: x86_64-target-arch
 // RUN: %clangxx_asan -g -O1 %s -fno-inline-functions -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mllvm -asan-instrument-assembly -o %t && not %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan -g -O1 %s -fno-inline-functions -fomit-frame-pointer -momit-leaf-frame-pointer -mllvm -asan-instrument-assembly -o %t && not %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan -g0 -O1 %s -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-exceptions -fno-inline-functions -fomit-frame-pointer -momit-leaf-frame-pointer -mllvm -asan-instrument-assembly -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-nounwind
index d67d945..a5808ba 100644 (file)
@@ -10,7 +10,7 @@
 // RUN: %env_asan_opts=verbosity=1 %run %t 2>&1 | FileCheck %s
 
 // GNU driver doesn't handle .so files properly.
-// REQUIRES: x86_64-supported-target, asan-64-bits, Clang
+// REQUIRES: x86_64-target-arch, Clang
 #if BUILD_SO
 int G;
 int *getG() {
index 669d152..845f412 100644 (file)
@@ -3,7 +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-supported-target
+// REQUIRES: arm-target-arch
 // XFAIL: armv7l-unknown-linux-gnueabihf
 
 #include <stdlib.h>
index 6cd3201..49487d3 100644 (file)
@@ -43,7 +43,7 @@
 // RUN: %sancov missing %dynamiclib < foo.txt > foo-missing.txt
 // RUN: ( diff bar.txt foo-missing.txt || true ) | not grep "^<"
 
-// REQUIRES: x86_64-supported-target, i386-supported-target
+// REQUIRES: x86-target-arch
 // XFAIL: android
 
 #include <stdio.h>
index 971feb5..2e64857 100644 (file)
@@ -56,6 +56,6 @@
 
 // FIXME: nm -D on powerpc somewhy shows ASan interface symbols residing
 // in "initialized data section".
-// REQUIRES: x86_64-supported-target,i386-supported-target,asan-static-runtime
+// REQUIRES: x86-target-arch,asan-static-runtime
 
 int main() { return 0; }
index c0f1727..d7a544f 100644 (file)
@@ -16,7 +16,7 @@
 // CHECK-kernel-64-bits: || `[0x28{{0+}}, 0x3{{f+}}]` || HighShadow ||
 // CHECK-kernel-64-bits: || `[0x24{{0+}}, 0x27{{f+}}]` || ShadowGap  ||
 //
-// REQUIRES: asan-32-bits,i386-supported-target
+// REQUIRES: i386-target-arch
 
 int main() {
   return 0;
index e8c9b74..ea23924 100644 (file)
@@ -7,7 +7,7 @@
 // https://code.google.com/p/address-sanitizer/issues/detail?id=137
 
 // Fast unwinder is only available on x86_64 and i386.
-// REQUIRES: x86_64-supported-target
+// REQUIRES: x86-target-arch
 
 // REQUIRES: compiler-rt-optimized
 
index 2758f0a..ce8f17e 100644 (file)
@@ -9,7 +9,7 @@
 // Would be great to run the test with no_huge_pages_for_shadow=0, but
 // the result will depend on the OS version and settings...
 //
-// REQUIRES: x86_64-supported-target, asan-64-bits
+// REQUIRES: x86_64-target-arch
 //
 // WARNING: this test is very subtle and may nto work on some systems.
 // If this is the case we'll need to futher improve it or disable it.
index ce824ba..75f46ed 100644 (file)
@@ -6,7 +6,7 @@
 // RUN: %clang_asan %s -fPIE %t-1.so %t-2.so -Wl,-R`pwd` -o %t
 // RUN: not %run %t 2>&1 | FileCheck %s
 //
-// REQUIRES: x86_64-supported-target
+// REQUIRES: x86_64-target-arch
 //
 // CHECK: The following global variable is not properly aligned.
 // CHECK: ERROR: AddressSanitizer: odr-violation
index dc3918e..6990518 100644 (file)
@@ -7,7 +7,7 @@
 // https://code.google.com/p/address-sanitizer/issues/detail?id=137
 
 // Fast unwinder is only available on x86_64 and i386.
-// REQUIRES: x86_64-supported-target
+// REQUIRES: x86-target-arch
 
 #include <stdlib.h>
 #include <stdio.h>
index 77d58b7..21f42a5 100644 (file)
@@ -32,7 +32,7 @@
 // RUN: not %run %t 26 2>&1 | FileCheck %s --check-prefix=CHECK26
 // RUN: not %run %t 27 2>&1 | FileCheck %s --check-prefix=CHECK27
 // Parts of the test are too platform-specific:
-// REQUIRES: x86_64-supported-target
+// REQUIRES: x86_64-target-arch
 // REQUIRES: shell
 #include <stdlib.h>
 #include <stdio.h>
index 86ed593..210a667 100644 (file)
@@ -6,7 +6,7 @@
 // RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s
 //
 // This test is too sublte to try on non-x86 arch for now.
-// REQUIRES: x86_64-supported-target,i386-supported-target
+// REQUIRES: x86-target-arch
 
 #include <stdio.h>
 #include <ucontext.h>
index 9c1d74b..19ebec4 100644 (file)
@@ -1,5 +1,5 @@
 // Test that TLS is unpoisoned on thread death.
-// REQUIRES: x86_64-supported-target,i386-supported-target
+// REQUIRES: x86-target-arch
 
 // RUN: %clangxx_asan -O1 %s -pthread -o %t && %run %t 2>&1
 
index 369abd3..0aafa3e 100644 (file)
@@ -11,8 +11,8 @@
 
 // This sublte test assumes that after a foo.so is dlclose-d
 // we can mmap the region of memory that has been occupied by the library.
-// It works on i368/x86_64 Linux, but not necessary anywhere else.
-// REQUIRES: x86_64-supported-target,i386-supported-target
+// It works on x86 Linux, but not necessary anywhere else.
+// REQUIRES: x86-target-arch
 
 // RUN: %clangxx_asan -O0 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
 // RUN: %clangxx_asan -O0 %s %libdl -o %t && %run %t 2>&1 | FileCheck %s
index 753a636..43e1183 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang_asan -O0 %s -o %t
 // RUN: %env_asan_opts=verbosity=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PPC64-V0
 // RUN: %env_asan_opts=verbosity=2 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PPC64
-// REQUIRES: powerpc64-supported-target
+// REQUIRES: powerpc64-target-arch
 
 #include <stdio.h>
 
index da86a0f..b5b38ff 100644 (file)
@@ -4,7 +4,7 @@
 // RUN: %env_asan_opts=dump_instruction_bytes=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-DUMP
 // RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NODUMP
 //
-// REQUIRES: x86_64-supported-target,i386-supported-target
+// REQUIRES: x86-target-arch
 
 int main() {
 #if defined(__x86_64__)
index d007536..5603dbe 100644 (file)
@@ -96,11 +96,11 @@ if config.host_os == 'Windows':
 else:
   config.substitutions.append( ("%expect_crash ", "not --crash ") )
 
-# Add supported compiler_rt architectures to a list of available features.
-compiler_rt_arch = getattr(config, 'compiler_rt_arch', None)
-if compiler_rt_arch:
-  for arch in compiler_rt_arch.split(";"):
-    config.available_features.add(arch + "-supported-target")
+target_arch = getattr(config, 'target_arch', None)
+if target_arch:
+  config.available_features.add(target_arch + '-target-arch')
+  if target_arch in ['x86_64', 'i386', 'i686']:
+    config.available_features.add('x86-target-arch')
 
 compiler_rt_debug = getattr(config, 'compiler_rt_debug', False)
 if not compiler_rt_debug:
index d9e6365..682ac3f 100644 (file)
@@ -22,7 +22,6 @@ set_default("llvm_shlib_dir", "@SHLIBDIR@")
 set_default("gold_executable", "@GOLD_EXECUTABLE@")
 set_default("clang", "@COMPILER_RT_TEST_COMPILER@")
 set_default("compiler_id", "@COMPILER_RT_TEST_COMPILER_ID@")
-set_default("compiler_rt_arch", "@COMPILER_RT_SUPPORTED_ARCH@")
 set_default("python_executable", "@PYTHON_EXECUTABLE@")
 set_default("compiler_rt_debug", @COMPILER_RT_DEBUG_PYBOOL@)
 set_default("compiler_rt_libdir", "@COMPILER_RT_LIBRARY_OUTPUT_DIR@")
index 633a8b1..5541436 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clangxx_msan -O0 %s -o %t && %run %t
 // RUN: %clangxx_msan -DPOSITIVE -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// REQUIRES: x86_64-supported-target
+// REQUIRES: x86_64-target-arch
 
 #include <emmintrin.h>
 
index b4be500..9a6f808 100644 (file)
@@ -9,7 +9,7 @@
 // XFAIL: tsan
 //
 // FIXME: seems to fail on ARM
-// REQUIRES: x86_64-supported-target
+// REQUIRES: x86_64-target-arch
 #include <assert.h>
 #include <stdio.h>
 #include <sanitizer/asan_interface.h>
index 1edad48..2c69618 100644 (file)
@@ -9,7 +9,7 @@
 // XFAIL: tsan
 //
 // FIXME: seems to fail on ARM
-// REQUIRES: x86_64-supported-target
+// REQUIRES: x86_64-target-arch
 #include <assert.h>
 #include <stdio.h>
 #include <sanitizer/asan_interface.h>
index 3bce030..cf31f44 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: %clangxx -m64 -O0 -g -xc++ %s -o %t && %run %t
 // RUN: %clangxx -m64 -O3 -g -xc++ %s -o %t && %run %t
-// REQUIRES: x86_64-supported-target
+// REQUIRES: x86_64-target-arch
 
 #include <assert.h>
 #include <stdio.h>