[LSAN] Enable more tests which are passing as is in HWASAN.
authorKirill Stoimenov <kstoimenov@google.com>
Thu, 2 Feb 2023 17:35:27 +0000 (17:35 +0000)
committerKirill Stoimenov <kstoimenov@google.com>
Thu, 2 Feb 2023 18:06:35 +0000 (18:06 +0000)
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D143126

compiler-rt/test/lsan/TestCases/Linux/log-path_test.cpp
compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp
compiler-rt/test/lsan/TestCases/disabler.c
compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp
compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp
compiler-rt/test/lsan/TestCases/link_turned_off.cpp
compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp
compiler-rt/test/lsan/TestCases/suppressions_default.cpp
compiler-rt/test/lsan/TestCases/suppressions_file.cpp
compiler-rt/test/lsan/TestCases/swapcontext.cpp

index 55f33843d465a0360a4072a06871469578f85766..2f824a195d17f92fddebf5e52ab1c5495c80ba49 100644 (file)
@@ -1,7 +1,4 @@
 // RUN: %clangxx_lsan %s -o %t
-
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
 // The globs below do not work in the lit shell.
 
 // Regular run.
@@ -30,4 +27,4 @@ int main() {
 
 // CHECK-ERROR: LeakSanitizer: detected memory leaks
 // CHECK-ERROR: Direct leak of 1337 byte(s) in 1 object(s) allocated from
-// CHECK-ERROR: SUMMARY: {{(Leak|Address)}}Sanitizer:
+// CHECK-ERROR: SUMMARY: {{.*}}Sanitizer:
index e088893d6c94459de0c30906cb5d4f184bc74b0d..812fc3302259b59d079904b395bb5bd301d3e64a 100644 (file)
@@ -4,9 +4,6 @@
 // RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=1" %run %t 2>&1
 // RUN: %env_lsan_opts="" %run %t 2>&1
 
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
-
 // Investigate why it does not fail with use_tls=0
 // UNSUPPORTED: arm-linux || armhf-linux
 
index fb57ef5c249a8a14513221fdfac740939c724581..3d785f4fca58fdf808443db15049927cd2a38c27 100644 (file)
@@ -2,9 +2,6 @@
 // RUN: %clang_lsan %s -o %t
 // RUN: %env_lsan_opts=report_objects=1:use_registers=0:use_stacks=0:use_tls=0 not %run %t 2>&1 | FileCheck %s
 
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
-
 // Investigate why it does not fail with use_tls=0
 // UNSUPPORTED: arm-linux || armhf-linux
 
@@ -26,4 +23,4 @@ int main() {
   fprintf(stderr, "Test alloc: %p.\n", q);
   return 0;
 }
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
index ba41aaa75eecf6989c659e7ea1ee94f4b857e46d..dcb293b77ba3a82ea5d9be634743d39e649e586b 100644 (file)
@@ -1,8 +1,5 @@
 // Test for __lsan_do_leak_check(). We test it by making the leak check run
 // before global destructors, which also tests compatibility with HeapChecker's
-
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
 // "normal" mode (LSan runs in "strict" mode by default).
 // RUN: %clangxx_lsan %s -o %t
 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s
@@ -37,5 +34,5 @@ int main(int argc, char *argv[]) {
   return 0;
 }
 
-// CHECK-strict: SUMMARY: {{(Leak|Address)}}Sanitizer: 2003 byte(s) leaked in 2 allocation(s)
-// CHECK-normal: SUMMARY: {{(Leak|Address)}}Sanitizer: 666 byte(s) leaked in 1 allocation(s)
+// CHECK-strict: SUMMARY: {{.*}}Sanitizer: 2003 byte(s) leaked in 2 allocation(s)
+// CHECK-normal: SUMMARY: {{.*}}Sanitizer: 666 byte(s) leaked in 1 allocation(s)
index c00fb5e1ceefcf1256b924c08d708761a464364e..ae33b41ffa6b87145630dacc62ecb389bcd736ec 100644 (file)
@@ -5,9 +5,6 @@
 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0:leak_check_at_exit=0 not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do
 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0:leak_check_at_exit=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont
 
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <sanitizer/lsan_interface.h>
@@ -19,5 +16,5 @@ int main(int argc, char *argv[]) {
   return 0;
 }
 
-// CHECK-do: SUMMARY: {{(Leak|Address)}}Sanitizer:
-// CHECK-dont-NOT: SUMMARY: {{(Leak|Address)}}Sanitizer:
+// CHECK-do: SUMMARY: {{.*}}Sanitizer:
+// CHECK-dont-NOT: SUMMARY: {{.*}}Sanitizer:
index 7227e0b9169886257bf4b9752214162e14fed123..4dcc9026e8a8b20073878d1ca41d7ff8599a9800 100644 (file)
@@ -2,9 +2,6 @@
 // RUN: %clangxx_lsan %s -o %t
 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t
 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t foo 2>&1 | FileCheck %s
-
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
 //
 // UNSUPPORTED: darwin
 
@@ -25,4 +22,4 @@ int main(int argc, char *argv[]) {
   return 0;
 }
 
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 4 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{(.*)}}Sanitizer: 4 byte(s) leaked in 1 allocation(s)
index ca0326d7e1f6b5e5fb1fe90b7786ff66f6e1dda2..718ffb1773ae070123f1683496b7f5b3dc7717ca 100644 (file)
@@ -3,9 +3,6 @@
 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t foo 2>&1 | FileCheck %s
 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t 2>&1 | FileCheck %s
 
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
-//
 // UNSUPPORTED: darwin
 
 #include <assert.h>
@@ -25,12 +22,12 @@ int main(int argc, char *argv[]) {
 // CHECK: Test alloc:
 
   assert(__lsan_do_recoverable_leak_check() == 1);
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte
+// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte
 
   // Test that we correctly reset chunk tags.
   p = 0;
   assert(__lsan_do_recoverable_leak_check() == 1);
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1360 byte
+// CHECK: SUMMARY: {{.*}}Sanitizer: 1360 byte
 
   _exit(0);
 }
index 9cc4a981f373c5b49d10ae63ac3037259dd8b242..0aa10f016e80685b529f1f2f3f79d9343362f241 100644 (file)
@@ -1,9 +1,6 @@
 // RUN: %clangxx_lsan %s -o %t
 // RUN: %env_lsan_opts=use_registers=0:use_stacks=0 not %run %t 2>&1 | FileCheck %s
 
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
-
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -27,4 +24,4 @@ int main() {
 }
 // CHECK: Suppressions used:
 // CHECK: 1 666 *LSanTestLeakingFunc*
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
index 441bb12fc38e18c84c2facc520d51109d67a460a..2b1ccd88f9b30fec282ab0512d2dbe000fbaba9c 100644 (file)
@@ -1,8 +1,5 @@
 // RUN: %clangxx_lsan %s -o %t
 
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
-
 // RUN: rm -f %t.supp
 // RUN: touch %t.supp
 // RUN: %push_to_device %t.supp %device_rundir/%t.supp
@@ -39,6 +36,6 @@ int main() {
 }
 // CHECK: Suppressions used:
 // CHECK: 1 666 *LSanTestLeakingFunc*
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
 
-// NOSUPP: SUMMARY: {{(Leak|Address)}}Sanitizer: 2780 byte(s) leaked in 3 allocation(s).
+// NOSUPP: SUMMARY: {{.*}}Sanitizer: 2780 byte(s) leaked in 3 allocation(s).
index f70b5de0255fb8b7ba33526217322c75f95a348e..567cde74499f10b0fb77ef21defaafe162d5ca68 100644 (file)
@@ -1,9 +1,6 @@
 // We can't unwind stack if we're running coroutines on heap-allocated
 // memory. Make sure we don't report these leaks.
 
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
-
 // RUN: %clangxx_lsan %s -o %t
 // RUN: %env_lsan_opts= %run %t 2>&1
 // RUN: %env_lsan_opts= not %run %t foo 2>&1 | FileCheck %s
@@ -44,4 +41,4 @@ int main(int argc, char *argv[]) {
   return 0;
 }
 
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 2664 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{.*}}Sanitizer: 2664 byte(s) leaked in 1 allocation(s)