[compiler-rt] r261603 - [tests] Remove "supported-target" in favor of "target-arch" lit features.

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 17:58:57 PST 2016


Author: samsonov
Date: Mon Feb 22 19:58:56 2016
New Revision: 261603

URL: http://llvm.org/viewvc/llvm-project?rev=261603&view=rev
Log:
[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.

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

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/asan-asm-stacktrace-test.cc Mon Feb 22 19:58:56 2016
@@ -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

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cc Mon Feb 22 19:58:56 2016
@@ -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() {

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc Mon Feb 22 19:58:56 2016
@@ -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>

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cc Mon Feb 22 19:58:56 2016
@@ -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>

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.c?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.c Mon Feb 22 19:58:56 2016
@@ -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; }

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cc Mon Feb 22 19:58:56 2016
@@ -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;

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cc Mon Feb 22 19:58:56 2016
@@ -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
 

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc Mon Feb 22 19:58:56 2016
@@ -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.

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/odr_c_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/odr_c_test.c?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/odr_c_test.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/odr_c_test.c Mon Feb 22 19:58:56 2016
@@ -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

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cc Mon Feb 22 19:58:56 2016
@@ -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>

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/scariness_score_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/scariness_score_test.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/scariness_score_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/scariness_score_test.cc Mon Feb 22 19:58:56 2016
@@ -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>

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cc Mon Feb 22 19:58:56 2016
@@ -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>

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc Mon Feb 22 19:58:56 2016
@@ -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
 

Modified: compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cc Mon Feb 22 19:58:56 2016
@@ -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

Modified: compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cc Mon Feb 22 19:58:56 2016
@@ -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>
 

Modified: compiler-rt/trunk/test/asan/TestCases/dump_instruction_bytes.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/dump_instruction_bytes.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/dump_instruction_bytes.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/dump_instruction_bytes.cc Mon Feb 22 19:58:56 2016
@@ -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__)

Modified: compiler-rt/trunk/test/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg (original)
+++ compiler-rt/trunk/test/lit.common.cfg Mon Feb 22 19:58:56 2016
@@ -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:

Modified: compiler-rt/trunk/test/lit.common.configured.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.configured.in?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.configured.in (original)
+++ compiler-rt/trunk/test/lit.common.configured.in Mon Feb 22 19:58:56 2016
@@ -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@")

Modified: compiler-rt/trunk/test/msan/vector_cvt.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/vector_cvt.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/msan/vector_cvt.cc (original)
+++ compiler-rt/trunk/test/msan/vector_cvt.cc Mon Feb 22 19:58:56 2016
@@ -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>
 

Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/fpe.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/fpe.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/fpe.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/fpe.cc Mon Feb 22 19:58:56 2016
@@ -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>

Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/ill.cc Mon Feb 22 19:58:56 2016
@@ -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>

Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc?rev=261603&r1=261602&r2=261603&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc Mon Feb 22 19:58:56 2016
@@ -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>




More information about the llvm-commits mailing list