[compiler-rt] r244522 - [Windows] Relax test case patterns to allow parameter lists

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 15:43:04 PDT 2015


Author: rnk
Date: Mon Aug 10 17:43:04 2015
New Revision: 244522

URL: http://llvm.org/viewvc/llvm-project?rev=244522&view=rev
Log:
[Windows] Relax test case patterns to allow parameter lists

llvm-symbolizer will print parameter types.  Split out from D11791.

NFC

Modified:
    compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc Mon Aug 10 17:43:04 2015
@@ -14,7 +14,7 @@ void make_access(S *s) {
   s->bf2 = 2;
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: READ of size {{[124]}} at [[ADDR]]
-// CHECK:   {{#0 .* make_access .*bitfield_uaf.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* make_access.*bitfield_uaf.cc}}:[[@LINE-3]]
 // CHECK:   {{#1 .* main}}
 }
 

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc Mon Aug 10 17:43:04 2015
@@ -43,8 +43,8 @@ int main() {
   free(buffer);
   A<char*> a(buffer);
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: foo::bar<42> {{.*}}demangled_names.cc
-// CHECK: foo::spam {{.*}}demangled_names.cc
-// CHECK: baz<char *,1> {{.*}}demangled_names.cc
-// CHECK: A<char *>::~A<char *> {{.*}}demangled_names.cc
+// CHECK: foo::bar<42>{{.*}}demangled_names.cc
+// CHECK: foo::spam{{.*}}demangled_names.cc
+// CHECK: baz<char *,1>{{.*}}demangled_names.cc
+// CHECK: A<char *>::~A<char *>{{.*}}demangled_names.cc
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc Mon Aug 10 17:43:04 2015
@@ -11,12 +11,12 @@ void noreturn_f() {
   _exit(1);
 // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT:  noreturn_f {{.*}}dll_noreturn.cc:[[@LINE-4]]
-// CHECK-NEXT:  test_function {{.*}}dll_noreturn.cc
-// CHECK-NEXT:  main {{.*}}dll_host.cc
+// CHECK-NEXT:  noreturn_f{{.*}}dll_noreturn.cc:[[@LINE-4]]
+// CHECK-NEXT:  test_function{{.*}}dll_noreturn.cc
+// CHECK-NEXT:  main{{.*}}dll_host.cc
 //
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT:  noreturn_f {{.*}}dll_noreturn.cc
+// CHECK-NEXT:  noreturn_f{{.*}}dll_noreturn.cc
 // CHECK: 'buffer' <== Memory access at offset [[OFFSET]] underflows this variable
 // CHECK-LABEL: SUMMARY
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc Mon Aug 10 17:43:04 2015
@@ -24,12 +24,12 @@ int test_function() {
   should_crash(&buffer[96]);
 // CHECK: AddressSanitizer: use-after-poison on address [[ADDR:0x[0-9a-f]+]]
 // CHECK-NEXT: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: should_crash {{.*}}\dll_poison_unpoison.cc
-// CHECK-NEXT: test_function {{.*}}\dll_poison_unpoison.cc:[[@LINE-4]]
+// CHECK-NEXT: should_crash{{.*}}\dll_poison_unpoison.cc
+// CHECK-NEXT: test_function{{.*}}\dll_poison_unpoison.cc:[[@LINE-4]]
 // CHECK-NEXT: main
 //
 // CHECK: [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: test_function {{.*}}\dll_poison_unpoison.cc
+// CHECK-NEXT: test_function{{.*}}\dll_poison_unpoison.cc
 // CHECK: 'buffer' <== Memory access at offset [[OFFSET]] is inside this variable
   return 0;
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc Mon Aug 10 17:43:04 2015
@@ -17,11 +17,11 @@ int test_function() {
   *x = 42;
 // CHECK: AddressSanitizer: stack-use-after-return
 // CHECK: WRITE of size 1 at [[ADDR:.*]] thread T0
-// CHECK-NEXT:  test_function {{.*}}dll_stack_use_after_return.cc:[[@LINE-3]]
+// CHECK-NEXT:  test_function{{.*}}dll_stack_use_after_return.cc:[[@LINE-3]]
 // CHECK-NEXT:  main
 //
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: #0 {{.*}} foo {{.*}}dll_stack_use_after_return.cc
+// CHECK-NEXT: #0 {{.*}} foo{{.*}}dll_stack_use_after_return.cc
 // CHECK: 'stack_buffer' <== Memory access at offset [[OFFSET]] is inside this variable
   return 0;
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc Mon Aug 10 17:43:04 2015
@@ -11,10 +11,10 @@ DWORD WINAPI thread_proc(void *context)
   stack_buffer[subscript] = 42;
 // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T1
-// CHECK-NEXT:  thread_proc {{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-3]]
+// CHECK-NEXT:  thread_proc{{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-3]]
 //
 // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT:  thread_proc {{.*}}dll_thread_stack_array_left_oob.cc
+// CHECK-NEXT:  thread_proc{{.*}}dll_thread_stack_array_left_oob.cc
 //
 // CHECK: 'stack_buffer' <== Memory access at offset [[OFFSET]] underflows this variable
 
@@ -25,8 +25,8 @@ extern "C" __declspec(dllexport)
 int test_function() {
   HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL);
 // CHECK-LABEL: Thread T1 created by T0 here:
-// CHECK:         test_function {{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-2]]
-// CHECK-NEXT:    main {{.*}}dll_host.cc
+// CHECK:         test_function{{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-2]]
+// CHECK-NEXT:    main{{.*}}dll_host.cc
 // CHECK-LABEL: SUMMARY
   if (thr == 0)
     return 1;

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc Mon Aug 10 17:43:04 2015
@@ -7,6 +7,6 @@ int main() {
   int *x = new int[42];
   delete (x + 1);
 // CHECK: AddressSanitizer: attempting free on address which was not malloc()-ed
-// CHECK:   {{#0 0x.* operator delete }}
+// CHECK:   {{#0 0x.* operator delete}}
 // CHECK:   {{#1 .* main .*operator_delete_wrong_argument.cc}}:[[@LINE-3]]
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc Mon Aug 10 17:43:04 2015
@@ -11,7 +11,7 @@ int main() {
 // CHECK:   {{#0 .* main .*operator_new_left_oob.cc}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 1 bytes to the left of 1-byte region
 // CHECK: allocated by thread T0 here:
-// CHECK:   {{#0 .* operator new }}
+// CHECK:   {{#0 .* operator new}}
 // CHECK:   {{#1 .* main .*operator_new_left_oob.cc}}:[[@LINE-8]]
   delete buffer;
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc Mon Aug 10 17:43:04 2015
@@ -11,7 +11,7 @@ int main() {
 // CHECK:   {{#0 .* main .*operator_new_right_oob.cc}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes to the right of 1-byte region
 // CHECK: allocated by thread T0 here:
-// CHECK:   {{#0 .* operator new }}
+// CHECK:   {{#0 .* operator new}}
 // CHECK:   {{#1 .* main .*operator_new_right_oob.cc}}:[[@LINE-8]]
   delete buffer;
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc Mon Aug 10 17:43:04 2015
@@ -12,10 +12,10 @@ int main() {
 // CHECK:   {{#0 .* main .*operator_new_uaf.cc}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 1-byte region
 // CHECK-LABEL: freed by thread T0 here:
-// CHECK:   {{#0 .* operator delete }}
+// CHECK:   {{#0 .* operator delete}}
 // CHECK:   {{#1 .* main .*operator_new_uaf.cc}}:[[@LINE-8]]
 // CHECK-LABEL: previously allocated by thread T0 here:
-// CHECK:   {{#0 .* operator new }}
+// CHECK:   {{#0 .* operator new}}
 // CHECK:   {{#1 .* main .*operator_new_uaf.cc}}:[[@LINE-12]]
   return 0;
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc Mon Aug 10 17:43:04 2015
@@ -11,7 +11,7 @@ DWORD CALLBACK work_item(LPVOID) {
   stack_buffer[subscript] = 42;
 // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T1
-// CHECK:   {{#0 .* work_item .*queue_user_work_item_report.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* work_item.*queue_user_work_item_report.cc}}:[[@LINE-3]]
 // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset {{.*}} in frame
 // CHECK:   work_item
   SetEvent(done);

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc Mon Aug 10 17:43:04 2015
@@ -16,7 +16,7 @@ int main() {
 // CHECK-NEXT: {{#0 0x.* in main .*stack_use_after_return.cc}}:[[@LINE-3]]
 //
 // CHECK: is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: {{#0 0x.* in foo .*stack_use_after_return.cc}}
+// CHECK-NEXT: {{#0 0x.* in foo.*stack_use_after_return.cc}}
 //
 // CHECK: 'stack_buffer' <== Memory access at offset [[OFFSET]] is inside this variable
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc Mon Aug 10 17:43:04 2015
@@ -16,7 +16,7 @@ int main() {
 // CHECK-NEXT: {{#0 .* main .*symbols_path.cc}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
 // CHECK: allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* malloc }}
+// CHECK-NEXT: {{#0 .* malloc}}
 // CHECK-NEXT: {{#1 .* main .*symbols_path.cc}}:[[@LINE-8]]
   free(buffer);
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc Mon Aug 10 17:43:04 2015
@@ -9,7 +9,7 @@ DWORD WINAPI thread_proc(void *) {
   stack_buffer[subscript] = 42;
 // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T1
-// CHECK:   {{#0 .* thread_proc .*thread_stack_array_left_oob.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* thread_proc.*thread_stack_array_left_oob.cc}}:[[@LINE-3]]
 // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset {{.*}} in frame
 // CHECK:   thread_proc
   return 0;

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc?rev=244522&r1=244521&r2=244522&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc Mon Aug 10 17:43:04 2015
@@ -9,7 +9,7 @@ DWORD WINAPI thread_proc(void *) {
   stack_buffer[subscript] = 42;
 // CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T1
-// CHECK:   {{#0 .* thread_proc .*thread_stack_array_right_oob.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* thread_proc.*thread_stack_array_right_oob.cc}}:[[@LINE-3]]
 // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset {{.*}} in frame
 // CHECK:   thread_proc
   return 0;




More information about the llvm-commits mailing list