summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-07-04 15:48:05 +0000
committerAlexey Samsonov <samsonov@google.com>2012-07-04 15:48:05 +0000
commitb4ea34f5d7c1b368cd7067459d57b171e7175a26 (patch)
tree5cc85a55adf9899817dfc4420060884107e10d50 /compiler-rt
parent77769caaef4e5c937f050a6feec9225044921e4d (diff)
downloadbcm5719-llvm-b4ea34f5d7c1b368cd7067459d57b171e7175a26.tar.gz
bcm5719-llvm-b4ea34f5d7c1b368cd7067459d57b171e7175a26.zip
[TSan] Improve output tests: allow reports to contain file:line:column instead of file:line
llvm-svn: 159714
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/tsan/output_tests/race_on_mutex.c5
-rw-r--r--compiler-rt/lib/tsan/output_tests/simple_stack.c21
-rw-r--r--compiler-rt/lib/tsan/output_tests/simple_stack2.cc14
3 files changed, 18 insertions, 22 deletions
diff --git a/compiler-rt/lib/tsan/output_tests/race_on_mutex.c b/compiler-rt/lib/tsan/output_tests/race_on_mutex.c
index 90c32ba5445..45c75be782d 100644
--- a/compiler-rt/lib/tsan/output_tests/race_on_mutex.c
+++ b/compiler-rt/lib/tsan/output_tests/race_on_mutex.c
@@ -35,8 +35,7 @@ int main() {
// CHECK: WARNING: ThreadSanitizer: data race
// CHECK-NEXT: Read of size 1 at {{.*}} by thread 2:
// CHECK-NEXT: #0 pthread_mutex_lock {{.*}} ({{.*}})
-// CHECK-NEXT: #1 Thread2 {{.*}}race_on_mutex.c:19 ({{.*}})
+// CHECK-NEXT: #1 Thread2 {{.*}}race_on_mutex.c:19{{(:3)?}} ({{.*}})
// CHECK-NEXT: Previous write of size 1 at {{.*}} by thread 1:
// CHECK-NEXT: #0 pthread_mutex_init {{.*}} ({{.*}})
-// CHECK-NEXT: #1 Thread1 {{.*}}race_on_mutex.c:10 ({{.*}})
-
+// CHECK-NEXT: #1 Thread1 {{.*}}race_on_mutex.c:10{{(:3)?}} ({{.*}})
diff --git a/compiler-rt/lib/tsan/output_tests/simple_stack.c b/compiler-rt/lib/tsan/output_tests/simple_stack.c
index ade99da7a63..2e94f23f3c4 100644
--- a/compiler-rt/lib/tsan/output_tests/simple_stack.c
+++ b/compiler-rt/lib/tsan/output_tests/simple_stack.c
@@ -48,19 +48,18 @@ int main() {
// CHECK: WARNING: ThreadSanitizer: data race
// CHECK-NEXT: Write of size 4 at {{.*}} by thread 1:
-// CHECK-NEXT: #0 foo1 {{.*}}simple_stack.c:8 ({{.*}})
-// CHECK-NEXT: #1 bar1 {{.*}}simple_stack.c:13 ({{.*}})
-// CHECK-NEXT: #2 Thread1 {{.*}}simple_stack.c:27 ({{.*}})
+// CHECK-NEXT: #0 foo1 {{.*}}simple_stack.c:8{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #1 bar1 {{.*}}simple_stack.c:13{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #2 Thread1 {{.*}}simple_stack.c:27{{(:3)?}} ({{.*}})
// CHECK-NEXT: Previous read of size 4 at {{.*}} by thread 2:
-// CHECK-NEXT: #0 foo2 {{.*}}simple_stack.c:17 ({{.*}})
-// CHECK-NEXT: #1 bar2 {{.*}}simple_stack.c:22 ({{.*}})
-// CHECK-NEXT: #2 Thread2 {{.*}}simple_stack.c:32 ({{.*}})
+// CHECK-NEXT: #0 foo2 {{.*}}simple_stack.c:17{{(:26)?}} ({{.*}})
+// CHECK-NEXT: #1 bar2 {{.*}}simple_stack.c:22{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #2 Thread2 {{.*}}simple_stack.c:32{{(:3)?}} ({{.*}})
// CHECK-NEXT: Thread 1 (running) created at:
// CHECK-NEXT: #0 pthread_create {{.*}} ({{.*}})
-// CHECK-NEXT: #1 StartThread {{.*}}simple_stack.c:37 ({{.*}})
-// CHECK-NEXT: #2 main {{.*}}simple_stack.c:42 ({{.*}})
+// CHECK-NEXT: #1 StartThread {{.*}}simple_stack.c:37{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #2 main {{.*}}simple_stack.c:42{{(:3)?}} ({{.*}})
// CHECK-NEXT: Thread 2 ({{.*}}) created at:
// CHECK-NEXT: #0 pthread_create {{.*}} ({{.*}})
-// CHECK-NEXT: #1 StartThread {{.*}}simple_stack.c:37 ({{.*}})
-// CHECK-NEXT: #2 main {{.*}}simple_stack.c:43 ({{.*}})
-
+// CHECK-NEXT: #1 StartThread {{.*}}simple_stack.c:37{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #2 main {{.*}}simple_stack.c:43{{(:3)?}} ({{.*}})
diff --git a/compiler-rt/lib/tsan/output_tests/simple_stack2.cc b/compiler-rt/lib/tsan/output_tests/simple_stack2.cc
index 811bc6deef4..336cc9ff599 100644
--- a/compiler-rt/lib/tsan/output_tests/simple_stack2.cc
+++ b/compiler-rt/lib/tsan/output_tests/simple_stack2.cc
@@ -37,12 +37,10 @@ int main() {
// CHECK: WARNING: ThreadSanitizer: data race
// CHECK-NEXT: Write of size 4 at {{.*}} by thread 1:
-// CHECK-NEXT: #0 foo1{{.*}} {{.*}}simple_stack2.cc:8 ({{.*}})
-// CHECK-NEXT: #1 bar1{{.*}} {{.*}}simple_stack2.cc:13 ({{.*}})
-// CHECK-NEXT: #2 Thread1{{.*}} {{.*}}simple_stack2.cc:27 ({{.*}})
+// CHECK-NEXT: #0 foo1{{.*}} {{.*}}simple_stack2.cc:8{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #1 bar1{{.*}} {{.*}}simple_stack2.cc:13{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #2 Thread1{{.*}} {{.*}}simple_stack2.cc:27{{(:3)?}} ({{.*}})
// CHECK-NEXT: Previous read of size 4 at {{.*}} by main thread:
-// CHECK-NEXT: #0 foo2{{.*}} {{.*}}simple_stack2.cc:17 ({{.*}})
-// CHECK-NEXT: #1 bar2{{.*}} {{.*}}simple_stack2.cc:22 ({{.*}})
-// CHECK-NEXT: #2 main{{.*}} {{.*}}simple_stack2.cc:34 ({{.*}})
-
-
+// CHECK-NEXT: #0 foo2{{.*}} {{.*}}simple_stack2.cc:17{{(:28)?}} ({{.*}})
+// CHECK-NEXT: #1 bar2{{.*}} {{.*}}simple_stack2.cc:22{{(:3)?}} ({{.*}})
+// CHECK-NEXT: #2 main{{.*}} {{.*}}simple_stack2.cc:34{{(:3)?}} ({{.*}})
OpenPOWER on IntegriCloud