diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2016-02-23 01:58:56 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2016-02-23 01:58:56 +0000 |
commit | 31f458fea861447ec73eec8178a8c0a775c590a4 (patch) | |
tree | b73a80410b82310efcfa32a0809e3f0d4965b8e7 | |
parent | 4f87e957770c76d8cb729346ce3e2c1f764b58e9 (diff) |
[tests] Remove "supported-target" in favor of "target-arch" lit features.
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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@261603 91177308-0d34-0410-b5e6-96231b3b80d8
22 files changed, 26 insertions, 27 deletions
diff --git a/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc b/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc index 5332c992a..cbc900dec 100644 --- a/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc +++ b/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc @@ -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 diff --git a/test/asan/TestCases/Linux/asan_prelink_test.cc b/test/asan/TestCases/Linux/asan_prelink_test.cc index d67d94585..a5808ba3a 100644 --- a/test/asan/TestCases/Linux/asan_prelink_test.cc +++ b/test/asan/TestCases/Linux/asan_prelink_test.cc @@ -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() { diff --git a/test/asan/TestCases/Linux/clang_gcc_abi.cc b/test/asan/TestCases/Linux/clang_gcc_abi.cc index 669d15240..845f4121a 100644 --- a/test/asan/TestCases/Linux/clang_gcc_abi.cc +++ b/test/asan/TestCases/Linux/clang_gcc_abi.cc @@ -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> diff --git a/test/asan/TestCases/Linux/coverage-missing.cc b/test/asan/TestCases/Linux/coverage-missing.cc index 6cd3201c4..49487d39a 100644 --- a/test/asan/TestCases/Linux/coverage-missing.cc +++ b/test/asan/TestCases/Linux/coverage-missing.cc @@ -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> diff --git a/test/asan/TestCases/Linux/interface_symbols_linux.c b/test/asan/TestCases/Linux/interface_symbols_linux.c index 971feb5dc..2e648575f 100644 --- a/test/asan/TestCases/Linux/interface_symbols_linux.c +++ b/test/asan/TestCases/Linux/interface_symbols_linux.c @@ -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; } diff --git a/test/asan/TestCases/Linux/kernel-area.cc b/test/asan/TestCases/Linux/kernel-area.cc index c0f17272a..d7a544fec 100644 --- a/test/asan/TestCases/Linux/kernel-area.cc +++ b/test/asan/TestCases/Linux/kernel-area.cc @@ -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; diff --git a/test/asan/TestCases/Linux/malloc-in-qsort.cc b/test/asan/TestCases/Linux/malloc-in-qsort.cc index e8c9b7480..ea2392442 100644 --- a/test/asan/TestCases/Linux/malloc-in-qsort.cc +++ b/test/asan/TestCases/Linux/malloc-in-qsort.cc @@ -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 diff --git a/test/asan/TestCases/Linux/nohugepage_test.cc b/test/asan/TestCases/Linux/nohugepage_test.cc index 2758f0ad0..ce8f17e78 100644 --- a/test/asan/TestCases/Linux/nohugepage_test.cc +++ b/test/asan/TestCases/Linux/nohugepage_test.cc @@ -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. diff --git a/test/asan/TestCases/Linux/odr_c_test.c b/test/asan/TestCases/Linux/odr_c_test.c index ce824bad9..75f46ed13 100644 --- a/test/asan/TestCases/Linux/odr_c_test.c +++ b/test/asan/TestCases/Linux/odr_c_test.c @@ -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 diff --git a/test/asan/TestCases/Linux/overflow-in-qsort.cc b/test/asan/TestCases/Linux/overflow-in-qsort.cc index dc3918e87..6990518e4 100644 --- a/test/asan/TestCases/Linux/overflow-in-qsort.cc +++ b/test/asan/TestCases/Linux/overflow-in-qsort.cc @@ -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> diff --git a/test/asan/TestCases/Linux/scariness_score_test.cc b/test/asan/TestCases/Linux/scariness_score_test.cc index 77d58b70d..21f42a561 100644 --- a/test/asan/TestCases/Linux/scariness_score_test.cc +++ b/test/asan/TestCases/Linux/scariness_score_test.cc @@ -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> diff --git a/test/asan/TestCases/Linux/swapcontext_test.cc b/test/asan/TestCases/Linux/swapcontext_test.cc index 86ed5930b..210a667d0 100644 --- a/test/asan/TestCases/Linux/swapcontext_test.cc +++ b/test/asan/TestCases/Linux/swapcontext_test.cc @@ -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> diff --git a/test/asan/TestCases/Linux/unpoison_tls.cc b/test/asan/TestCases/Linux/unpoison_tls.cc index 9c1d74b28..19ebec467 100644 --- a/test/asan/TestCases/Linux/unpoison_tls.cc +++ b/test/asan/TestCases/Linux/unpoison_tls.cc @@ -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 diff --git a/test/asan/TestCases/Posix/dlclose-test.cc b/test/asan/TestCases/Posix/dlclose-test.cc index 369abd312..0aafa3e79 100644 --- a/test/asan/TestCases/Posix/dlclose-test.cc +++ b/test/asan/TestCases/Posix/dlclose-test.cc @@ -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 diff --git a/test/asan/TestCases/debug_ppc64_mapping.cc b/test/asan/TestCases/debug_ppc64_mapping.cc index 753a6364f..43e1183a2 100644 --- a/test/asan/TestCases/debug_ppc64_mapping.cc +++ b/test/asan/TestCases/debug_ppc64_mapping.cc @@ -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> diff --git a/test/asan/TestCases/dump_instruction_bytes.cc b/test/asan/TestCases/dump_instruction_bytes.cc index da86a0f9a..b5b38ff08 100644 --- a/test/asan/TestCases/dump_instruction_bytes.cc +++ b/test/asan/TestCases/dump_instruction_bytes.cc @@ -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__) diff --git a/test/lit.common.cfg b/test/lit.common.cfg index d00753617..5603dbec2 100644 --- a/test/lit.common.cfg +++ b/test/lit.common.cfg @@ -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: diff --git a/test/lit.common.configured.in b/test/lit.common.configured.in index d9e6365a9..682ac3fa3 100644 --- a/test/lit.common.configured.in +++ b/test/lit.common.configured.in @@ -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@") diff --git a/test/msan/vector_cvt.cc b/test/msan/vector_cvt.cc index 633a8b15c..5541436ea 100644 --- a/test/msan/vector_cvt.cc +++ b/test/msan/vector_cvt.cc @@ -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> diff --git a/test/sanitizer_common/TestCases/Linux/fpe.cc b/test/sanitizer_common/TestCases/Linux/fpe.cc index b4be50073..9a6f808a5 100644 --- a/test/sanitizer_common/TestCases/Linux/fpe.cc +++ b/test/sanitizer_common/TestCases/Linux/fpe.cc @@ -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> diff --git a/test/sanitizer_common/TestCases/Linux/ill.cc b/test/sanitizer_common/TestCases/Linux/ill.cc index 1edad4817..2c69618ad 100644 --- a/test/sanitizer_common/TestCases/Linux/ill.cc +++ b/test/sanitizer_common/TestCases/Linux/ill.cc @@ -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> diff --git a/test/sanitizer_common/TestCases/Linux/open_memstream.cc b/test/sanitizer_common/TestCases/Linux/open_memstream.cc index 3bce030dd..cf31f44be 100644 --- a/test/sanitizer_common/TestCases/Linux/open_memstream.cc +++ b/test/sanitizer_common/TestCases/Linux/open_memstream.cc @@ -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> |