summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/lit_tests/mutexset2.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-12-28 08:38:09 +0000
committerAlexey Samsonov <samsonov@google.com>2012-12-28 08:38:09 +0000
commitf96bfd884920bc326ca86772a06d9d315d1498b0 (patch)
treea8f6b39d53a8d398f12c35d4c2702d53e1ccb325 /compiler-rt/lib/tsan/lit_tests/mutexset2.cc
parent9785f519b48eb54fb63773fb629439d1859a1bda (diff)
downloadbcm5719-llvm-f96bfd884920bc326ca86772a06d9d315d1498b0.tar.gz
bcm5719-llvm-f96bfd884920bc326ca86772a06d9d315d1498b0.zip
Make ASan and TSan tests a bit less brittle with @LINE FileCheck macro
llvm-svn: 171181
Diffstat (limited to 'compiler-rt/lib/tsan/lit_tests/mutexset2.cc')
-rw-r--r--compiler-rt/lib/tsan/lit_tests/mutexset2.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset2.cc b/compiler-rt/lib/tsan/lit_tests/mutexset2.cc
index 8c850438349..15d23033251 100644
--- a/compiler-rt/lib/tsan/lit_tests/mutexset2.cc
+++ b/compiler-rt/lib/tsan/lit_tests/mutexset2.cc
@@ -20,6 +20,13 @@ void *Thread2(void *x) {
}
int main() {
+ // CHECK: WARNING: ThreadSanitizer: data race
+ // CHECK: Write of size 4 at {{.*}} by thread T2:
+ // CHECK: Previous write of size 4 at {{.*}} by thread T1
+ // CHECK: (mutexes: write [[M1:M[0-9]+]]):
+ // CHECK: Mutex [[M1]] created at:
+ // CHECK: #0 pthread_mutex_init
+ // CHECK: #1 main {{.*}}/mutexset2.cc:[[@LINE+1]]
pthread_mutex_init(&mtx, 0);
pthread_t t[2];
pthread_create(&t[0], NULL, Thread1, NULL);
@@ -28,12 +35,3 @@ int main() {
pthread_join(t[1], NULL);
pthread_mutex_destroy(&mtx);
}
-
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK: Write of size 4 at {{.*}} by thread T2:
-// CHECK: Previous write of size 4 at {{.*}} by thread T1
-// CHECK: (mutexes: write [[M1:M[0-9]+]]):
-// CHECK: Mutex [[M1]] created at:
-// CHECK: #0 pthread_mutex_init
-// CHECK: #1 main {{.*}}/mutexset2.cc:23
-
OpenPOWER on IntegriCloud