[llvm-commits] [compiler-rt] r159714 - in /compiler-rt/trunk/lib/tsan/output_tests: race_on_mutex.c simple_stack.c simple_stack2.cc

Alexey Samsonov samsonov at google.com
Wed Jul 4 08:48:06 PDT 2012


Author: samsonov
Date: Wed Jul  4 10:48:05 2012
New Revision: 159714

URL: http://llvm.org/viewvc/llvm-project?rev=159714&view=rev
Log:
[TSan] Improve output tests: allow reports to contain file:line:column instead of file:line

Modified:
    compiler-rt/trunk/lib/tsan/output_tests/race_on_mutex.c
    compiler-rt/trunk/lib/tsan/output_tests/simple_stack.c
    compiler-rt/trunk/lib/tsan/output_tests/simple_stack2.cc

Modified: compiler-rt/trunk/lib/tsan/output_tests/race_on_mutex.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/output_tests/race_on_mutex.c?rev=159714&r1=159713&r2=159714&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/output_tests/race_on_mutex.c (original)
+++ compiler-rt/trunk/lib/tsan/output_tests/race_on_mutex.c Wed Jul  4 10:48:05 2012
@@ -35,8 +35,7 @@
 // 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)?}} ({{.*}})

Modified: compiler-rt/trunk/lib/tsan/output_tests/simple_stack.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/output_tests/simple_stack.c?rev=159714&r1=159713&r2=159714&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/output_tests/simple_stack.c (original)
+++ compiler-rt/trunk/lib/tsan/output_tests/simple_stack.c Wed Jul  4 10:48:05 2012
@@ -48,19 +48,18 @@
 
 // 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)?}} ({{.*}})

Modified: compiler-rt/trunk/lib/tsan/output_tests/simple_stack2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/output_tests/simple_stack2.cc?rev=159714&r1=159713&r2=159714&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/output_tests/simple_stack2.cc (original)
+++ compiler-rt/trunk/lib/tsan/output_tests/simple_stack2.cc Wed Jul  4 10:48:05 2012
@@ -37,12 +37,10 @@
 
 // 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)?}} ({{.*}})





More information about the llvm-commits mailing list