[llvm-commits] [compiler-rt] r171186 - in /compiler-rt/trunk/lib: sanitizer_common/scripts/check_lint.sh tsan/lit_tests/Helpers/blacklist.txt tsan/lit_tests/blacklist.cc tsan/lit_tests/test_output.sh

Alexey Samsonov samsonov at google.com
Fri Dec 28 02:06:26 PST 2012


Author: samsonov
Date: Fri Dec 28 04:06:26 2012
New Revision: 171186

URL: http://llvm.org/viewvc/llvm-project?rev=171186&view=rev
Log:
[TSan] Blacklist test: Rename blacklisted function. Make this test work for custom TSan testing script.

Modified:
    compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh
    compiler-rt/trunk/lib/tsan/lit_tests/Helpers/blacklist.txt
    compiler-rt/trunk/lib/tsan/lit_tests/blacklist.cc
    compiler-rt/trunk/lib/tsan/lit_tests/test_output.sh

Modified: compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh?rev=171186&r1=171185&r2=171186&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh (original)
+++ compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh Fri Dec 28 04:06:26 2012
@@ -24,6 +24,7 @@
 ASAN_LIT_TEST_LINT_FILTER=${ASAN_TEST_LINT_FILTER},-whitespace/line_length
 TSAN_RTL_LINT_FILTER=-legal/copyright,-build/include,-readability/casting,-build/header_guard,-build/namespaces
 TSAN_TEST_LINT_FILTER=${TSAN_RTL_LINT_FILTER},-runtime/threadsafe_fn,-runtime/int
+TSAN_LIT_TEST_LINT_FILTER=${TSAN_TEST_LINT_FILTER},-whitespace/line_length
 MSAN_RTL_LINT_FILTER=-legal/copyright,-build/include,-readability/casting,-build/header_guard,-build/namespaces
 
 cd ${LLVM_CHECKOUT}
@@ -60,8 +61,8 @@
 TSAN_RTL=${COMPILER_RT}/lib/tsan
 ${CPPLINT} --filter=${TSAN_RTL_LINT_FILTER} ${TSAN_RTL}/rtl/*.{cc,h}
 ${CPPLINT} --filter=${TSAN_TEST_LINT_FILTER} ${TSAN_RTL}/tests/rtl/*.{cc,h} \
-                                             ${TSAN_RTL}/tests/unit/*.cc \
-                                             ${TSAN_RTL}/lit_tests/*.cc
+                                             ${TSAN_RTL}/tests/unit/*.cc
+${CPPLINT} --filter=${TSAN_LIT_TEST_LINT_FILTER} ${TSAN_RTL}/lit_tests/*.cc
 # MSan
 MSAN_RTL=${COMPILER_RT}/lib/msan
 ${CPPLINT} --filter=${MSAN_RTL_LINT_FILTER} ${MSAN_RTL}/*.{cc,h}

Modified: compiler-rt/trunk/lib/tsan/lit_tests/Helpers/blacklist.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/Helpers/blacklist.txt?rev=171186&r1=171185&r2=171186&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/Helpers/blacklist.txt (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/Helpers/blacklist.txt Fri Dec 28 04:06:26 2012
@@ -1 +1 @@
-fun:*Thread2*
+fun:*Blacklisted_Thread2*

Modified: compiler-rt/trunk/lib/tsan/lit_tests/blacklist.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/blacklist.cc?rev=171186&r1=171185&r2=171186&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/blacklist.cc (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/blacklist.cc Fri Dec 28 04:06:26 2012
@@ -13,7 +13,7 @@
   return NULL;
 }
 
-void *Thread2(void *x) {
+void *Blacklisted_Thread2(void *x) {
   Global--;
   return NULL;
 }
@@ -21,7 +21,7 @@
 int main() {
   pthread_t t[2];
   pthread_create(&t[0], NULL, Thread1, NULL);
-  pthread_create(&t[1], NULL, Thread2, NULL);
+  pthread_create(&t[1], NULL, Blacklisted_Thread2, NULL);
   pthread_join(t[0], NULL);
   pthread_join(t[1], NULL);
   printf("PASS\n");

Modified: compiler-rt/trunk/lib/tsan/lit_tests/test_output.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/test_output.sh?rev=171186&r1=171185&r2=171186&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/test_output.sh (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/test_output.sh Fri Dec 28 04:06:26 2012
@@ -4,13 +4,14 @@
 set -e # fail on any error
 
 ROOTDIR=$(dirname $0)/..
+BLACKLIST=$ROOTDIR/lit_tests/Helpers/blacklist.txt
 
 # Assuming clang is in path.
 CC=clang
 CXX=clang++
 
 # TODO: add testing for all of -O0...-O3
-CFLAGS="-fsanitize=thread -fPIE -O1 -g -fno-builtin -Wall"
+CFLAGS="-fsanitize=thread -fsanitize-blacklist=$BLACKLIST -fPIE -O1 -g -fno-builtin -Wall"
 LDFLAGS="-pie -lpthread -ldl $ROOTDIR/rtl/libtsan.a"
 
 test_file() {





More information about the llvm-commits mailing list