diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2012-12-06 15:42:54 +0000 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2012-12-06 15:42:54 +0000 |
| commit | e3e0557f196a7b8862f091183c8f05acd1e48de2 (patch) | |
| tree | f4d169b03c19b22deb07f17f44467dd75943d2a2 /compiler-rt/lib/tsan/lit_tests | |
| parent | 6928cf78262ef71b2f8f560533e064277960b685 (diff) | |
| download | bcm5719-llvm-e3e0557f196a7b8862f091183c8f05acd1e48de2.tar.gz bcm5719-llvm-e3e0557f196a7b8862f091183c8f05acd1e48de2.zip | |
tsan: fix lint warning and make output tests more robust
llvm-svn: 169511
Diffstat (limited to 'compiler-rt/lib/tsan/lit_tests')
| -rw-r--r-- | compiler-rt/lib/tsan/lit_tests/ignore_race.cc | 2 | ||||
| -rw-r--r-- | compiler-rt/lib/tsan/lit_tests/mutexset1.cc | 5 | ||||
| -rw-r--r-- | compiler-rt/lib/tsan/lit_tests/mutexset2.cc | 5 | ||||
| -rw-r--r-- | compiler-rt/lib/tsan/lit_tests/mutexset3.cc | 7 | ||||
| -rw-r--r-- | compiler-rt/lib/tsan/lit_tests/mutexset4.cc | 6 | ||||
| -rw-r--r-- | compiler-rt/lib/tsan/lit_tests/mutexset5.cc | 10 | ||||
| -rw-r--r-- | compiler-rt/lib/tsan/lit_tests/mutexset6.cc | 11 | ||||
| -rw-r--r-- | compiler-rt/lib/tsan/lit_tests/mutexset7.cc | 4 |
8 files changed, 28 insertions, 22 deletions
diff --git a/compiler-rt/lib/tsan/lit_tests/ignore_race.cc b/compiler-rt/lib/tsan/lit_tests/ignore_race.cc index 156f240882a..d8f26ff46ca 100644 --- a/compiler-rt/lib/tsan/lit_tests/ignore_race.cc +++ b/compiler-rt/lib/tsan/lit_tests/ignore_race.cc @@ -28,4 +28,4 @@ int main() { return 0; } -// CHECK-NOT: ThreadSanitizer +// CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset1.cc b/compiler-rt/lib/tsan/lit_tests/mutexset1.cc index 1140e545db2..53486ed79cb 100644 --- a/compiler-rt/lib/tsan/lit_tests/mutexset1.cc +++ b/compiler-rt/lib/tsan/lit_tests/mutexset1.cc @@ -30,9 +30,10 @@ int main() { } // CHECK: WARNING: ThreadSanitizer: data race -// CHECK: Write of size 4 at {{.*}} by thread T1 (mutexes: write M1): +// CHECK: Write of size 4 at {{.*}} by thread T1 +// CHECK: (mutexes: write [[M1:M[0-9]+]]): // CHECK: Previous write of size 4 at {{.*}} by thread T2: -// CHECK: Mutex M1 created at: +// CHECK: Mutex [[M1]] created at: // CHECK: #0 pthread_mutex_init // CHECK: #1 main {{.*}}/mutexset1.cc:23 diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset2.cc b/compiler-rt/lib/tsan/lit_tests/mutexset2.cc index 35f4d899a8a..7338ca12688 100644 --- a/compiler-rt/lib/tsan/lit_tests/mutexset2.cc +++ b/compiler-rt/lib/tsan/lit_tests/mutexset2.cc @@ -31,8 +31,9 @@ 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 (mutexes: write M1): -// CHECK: Mutex M1 created at: +// 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 diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset3.cc b/compiler-rt/lib/tsan/lit_tests/mutexset3.cc index 652dff0d43e..9a38bf39b5c 100644 --- a/compiler-rt/lib/tsan/lit_tests/mutexset3.cc +++ b/compiler-rt/lib/tsan/lit_tests/mutexset3.cc @@ -35,12 +35,13 @@ int main() { } // CHECK: WARNING: ThreadSanitizer: data race -// CHECK: Write of size 4 at {{.*}} by thread T1 (mutexes: write M1, write M2): +// CHECK: Write of size 4 at {{.*}} by thread T1 +// CHECK: (mutexes: write [[M1:M[0-9]+]], write [[M2:M[0-9]+]]): // CHECK: Previous write of size 4 at {{.*}} by thread T2: -// CHECK: Mutex M1 created at: +// CHECK: Mutex [[M1]] created at: // CHECK: #0 pthread_mutex_init // CHECK: #1 main {{.*}}/mutexset3.cc:26 -// CHECK: Mutex M2 created at: +// CHECK: Mutex [[M2]] created at: // CHECK: #0 pthread_mutex_init // CHECK: #1 main {{.*}}/mutexset3.cc:27 diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset4.cc b/compiler-rt/lib/tsan/lit_tests/mutexset4.cc index 06bf48f5554..2a710129eda 100644 --- a/compiler-rt/lib/tsan/lit_tests/mutexset4.cc +++ b/compiler-rt/lib/tsan/lit_tests/mutexset4.cc @@ -37,11 +37,11 @@ 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, write M2): -// CHECK: Mutex M1 created at: +// CHECK: (mutexes: write [[M1:M[0-9]+]], write [[M2:M[0-9]+]]): +// CHECK: Mutex [[M1]] created at: // CHECK: #0 pthread_mutex_init // CHECK: #1 main {{.*}}/mutexset4.cc:26 -// CHECK: Mutex M2 created at: +// CHECK: Mutex [[M2]] created at: // CHECK: #0 pthread_mutex_init // CHECK: #1 main {{.*}}/mutexset4.cc:27 diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset5.cc b/compiler-rt/lib/tsan/lit_tests/mutexset5.cc index c3c4cd22b69..7b3140a3967 100644 --- a/compiler-rt/lib/tsan/lit_tests/mutexset5.cc +++ b/compiler-rt/lib/tsan/lit_tests/mutexset5.cc @@ -35,12 +35,14 @@ int main() { } // CHECK: WARNING: ThreadSanitizer: data race -// CHECK: Write of size 4 at {{.*}} by thread T1 (mutexes: write M1): -// CHECK: Previous write of size 4 at {{.*}} by thread T2 (mutexes: write M2): -// CHECK: Mutex M1 created at: +// CHECK: Write of size 4 at {{.*}} by thread T1 +// CHECK: (mutexes: write [[M1:M[0-9]+]]): +// CHECK: Previous write of size 4 at {{.*}} by thread T2 +// CHECK: (mutexes: write [[M2:M[0-9]+]]): +// CHECK: Mutex [[M1]] created at: // CHECK: #0 pthread_mutex_init // CHECK: #1 main {{.*}}/mutexset5.cc:26 -// CHECK: Mutex M2 created at: +// CHECK: Mutex [[M2]] created at: // CHECK: #0 pthread_mutex_init // CHECK: #1 main {{.*}}/mutexset5.cc:27 diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset6.cc b/compiler-rt/lib/tsan/lit_tests/mutexset6.cc index e25088c2ab5..38490365487 100644 --- a/compiler-rt/lib/tsan/lit_tests/mutexset6.cc +++ b/compiler-rt/lib/tsan/lit_tests/mutexset6.cc @@ -42,13 +42,14 @@ int main() { } // CHECK: WARNING: ThreadSanitizer: data race -// CHECK: Write of size 4 at {{.*}} by thread T1 (mutexes: write M1): +// CHECK: Write of size 4 at {{.*}} by thread T1 +// CHECK: (mutexes: write [[M1:M[0-9]+]]): // CHECK: Previous write of size 4 at {{.*}} by thread T2 -// CHECK: (mutexes: write M2, read M3): -// CHECK: Mutex M1 created at: +// CHECK: (mutexes: write [[M2:M[0-9]+]], read [[M3:M[0-9]+]]): +// CHECK: Mutex [[M1]] created at: // CHECK: #1 main {{.*}}/mutexset6.cc:31 -// CHECK: Mutex M2 created at: +// CHECK: Mutex [[M2]] created at: // CHECK: #1 main {{.*}}/mutexset6.cc:32 -// CHECK: Mutex M3 created at: +// CHECK: Mutex [[M3]] created at: // CHECK: #1 main {{.*}}/mutexset6.cc:33 diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset7.cc b/compiler-rt/lib/tsan/lit_tests/mutexset7.cc index 2516928bafa..03ca9ae0394 100644 --- a/compiler-rt/lib/tsan/lit_tests/mutexset7.cc +++ b/compiler-rt/lib/tsan/lit_tests/mutexset7.cc @@ -32,7 +32,7 @@ int main() { // CHECK: WARNING: ThreadSanitizer: data race // CHECK: Write of size 4 at {{.*}} by thread T1: // CHECK: Previous write of size 4 at {{.*}} by thread T2 -// CHECK: (mutexes: write M{{[0-9]+}}): -// CHECK: Mutex M{{[0-9]+}} is already destroyed +// CHECK: (mutexes: write [[M1:M[0-9]+]]): +// CHECK: Mutex [[M1]] is already destroyed // CHECK-NOT: Mutex {{.*}} created at |

