summaryrefslogtreecommitdiff
path: root/lib/tsan/lit_tests
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-12-28 10:06:26 +0000
committerAlexey Samsonov <samsonov@google.com>2012-12-28 10:06:26 +0000
commit89efdc5f601988a96413585da55dfd9ffc396509 (patch)
tree8f4ea9105beff6de0f2e7b9b7ce4255b0e5a08f6 /lib/tsan/lit_tests
parent7e3d21fac4e6407b04f9948309f86adc609720ab (diff)
downloadcompiler-rt-89efdc5f601988a96413585da55dfd9ffc396509.tar.gz
[TSan] Blacklist test: Rename blacklisted function. Make this test work for custom TSan testing script.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171186 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/lit_tests')
-rw-r--r--lib/tsan/lit_tests/Helpers/blacklist.txt2
-rw-r--r--lib/tsan/lit_tests/blacklist.cc4
-rwxr-xr-xlib/tsan/lit_tests/test_output.sh3
3 files changed, 5 insertions, 4 deletions
diff --git a/lib/tsan/lit_tests/Helpers/blacklist.txt b/lib/tsan/lit_tests/Helpers/blacklist.txt
index 800020607..22225e542 100644
--- a/lib/tsan/lit_tests/Helpers/blacklist.txt
+++ b/lib/tsan/lit_tests/Helpers/blacklist.txt
@@ -1 +1 @@
-fun:*Thread2*
+fun:*Blacklisted_Thread2*
diff --git a/lib/tsan/lit_tests/blacklist.cc b/lib/tsan/lit_tests/blacklist.cc
index 855c4ff1a..5baf926e6 100644
--- a/lib/tsan/lit_tests/blacklist.cc
+++ b/lib/tsan/lit_tests/blacklist.cc
@@ -13,7 +13,7 @@ void *Thread1(void *x) {
return NULL;
}
-void *Thread2(void *x) {
+void *Blacklisted_Thread2(void *x) {
Global--;
return NULL;
}
@@ -21,7 +21,7 @@ void *Thread2(void *x) {
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");
diff --git a/lib/tsan/lit_tests/test_output.sh b/lib/tsan/lit_tests/test_output.sh
index b772848bd..d21c9a797 100755
--- a/lib/tsan/lit_tests/test_output.sh
+++ b/lib/tsan/lit_tests/test_output.sh
@@ -4,13 +4,14 @@ ulimit -s 8192
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() {