Skip to content

Commit 042f01b

Browse files
committed
Revert "[LSAN] Enable more tests which are passing as is in HWASAN."
This reverts commit b4abbf1.
1 parent 7747a14 commit 042f01b

11 files changed

+46
-13
lines changed

compiler-rt/test/lsan/TestCases/Linux/log-path_test.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// RUN: %clangxx_lsan %s -o %t
2+
3+
// Fixme: remove once test passes with hwasan
4+
// UNSUPPORTED: hwasan
25
// The globs below do not work in the lit shell.
36

47
// Regular run.
@@ -27,4 +30,4 @@ int main() {
2730

2831
// CHECK-ERROR: LeakSanitizer: detected memory leaks
2932
// CHECK-ERROR: Direct leak of 1337 byte(s) in 1 object(s) allocated from
30-
// CHECK-ERROR: SUMMARY: {{.*}}Sanitizer:
33+
// CHECK-ERROR: SUMMARY: {{(Leak|Address)}}Sanitizer:

compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=1" %run %t 2>&1
55
// RUN: %env_lsan_opts="" %run %t 2>&1
66

7+
// Fixme: remove once test passes with hwasan
8+
// UNSUPPORTED: hwasan
9+
710
// Investigate why it does not fail with use_tls=0
811
// UNSUPPORTED: arm-linux || armhf-linux
912

compiler-rt/test/lsan/TestCases/disabler.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// RUN: %clang_lsan %s -o %t
33
// RUN: %env_lsan_opts=report_objects=1:use_registers=0:use_stacks=0:use_tls=0 not %run %t 2>&1 | FileCheck %s
44

5+
// Fixme: remove once test passes with hwasan
6+
// UNSUPPORTED: hwasan
7+
58
// Investigate why it does not fail with use_tls=0
69
// UNSUPPORTED: arm-linux || armhf-linux
710

@@ -23,4 +26,4 @@ int main() {
2326
fprintf(stderr, "Test alloc: %p.\n", q);
2427
return 0;
2528
}
26-
// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
29+
// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)

compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// Test for __lsan_do_leak_check(). We test it by making the leak check run
22
// before global destructors, which also tests compatibility with HeapChecker's
3+
4+
// Fixme: remove once test passes with hwasan
5+
// UNSUPPORTED: hwasan
36
// "normal" mode (LSan runs in "strict" mode by default).
47
// RUN: %clangxx_lsan %s -o %t
58
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s
@@ -34,5 +37,5 @@ int main(int argc, char *argv[]) {
3437
return 0;
3538
}
3639

37-
// CHECK-strict: SUMMARY: {{.*}}Sanitizer: 2003 byte(s) leaked in 2 allocation(s)
38-
// CHECK-normal: SUMMARY: {{.*}}Sanitizer: 666 byte(s) leaked in 1 allocation(s)
40+
// CHECK-strict: SUMMARY: {{(Leak|Address)}}Sanitizer: 2003 byte(s) leaked in 2 allocation(s)
41+
// CHECK-normal: SUMMARY: {{(Leak|Address)}}Sanitizer: 666 byte(s) leaked in 1 allocation(s)

compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
// 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
66
// 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
77

8+
// Fixme: remove once test passes with hwasan
9+
// UNSUPPORTED: hwasan
10+
811
#include <stdio.h>
912
#include <stdlib.h>
1013
#include <sanitizer/lsan_interface.h>
@@ -16,5 +19,5 @@ int main(int argc, char *argv[]) {
1619
return 0;
1720
}
1821

19-
// CHECK-do: SUMMARY: {{.*}}Sanitizer:
20-
// CHECK-dont-NOT: SUMMARY: {{.*}}Sanitizer:
22+
// CHECK-do: SUMMARY: {{(Leak|Address)}}Sanitizer:
23+
// CHECK-dont-NOT: SUMMARY: {{(Leak|Address)}}Sanitizer:

compiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// RUN: %clangxx_lsan %s -o %t
44
// RUN: %env_lsan_opts="log_pointers=1:log_threads=1" %run %t
55

6+
// Fixme: remove once test passes with hwasan
7+
// UNSUPPORTED: hwasan
8+
69
#include <assert.h>
710
#include <pthread.h>
811
#include <stdio.h>

compiler-rt/test/lsan/TestCases/link_turned_off.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// RUN: %clangxx_lsan %s -o %t
33
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t
44
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t foo 2>&1 | FileCheck %s
5+
6+
// Fixme: remove once test passes with hwasan
7+
// UNSUPPORTED: hwasan
58
//
69
// UNSUPPORTED: darwin
710

@@ -22,4 +25,4 @@ int main(int argc, char *argv[]) {
2225
return 0;
2326
}
2427

25-
// CHECK: SUMMARY: {{(.*)}}Sanitizer: 4 byte(s) leaked in 1 allocation(s)
28+
// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 4 byte(s) leaked in 1 allocation(s)

compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t foo 2>&1 | FileCheck %s
44
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t 2>&1 | FileCheck %s
55

6+
// Fixme: remove once test passes with hwasan
7+
// UNSUPPORTED: hwasan
8+
//
69
// UNSUPPORTED: darwin
710

811
#include <assert.h>
@@ -22,12 +25,12 @@ int main(int argc, char *argv[]) {
2225
// CHECK: Test alloc:
2326

2427
assert(__lsan_do_recoverable_leak_check() == 1);
25-
// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte
28+
// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte
2629

2730
// Test that we correctly reset chunk tags.
2831
p = 0;
2932
assert(__lsan_do_recoverable_leak_check() == 1);
30-
// CHECK: SUMMARY: {{.*}}Sanitizer: 1360 byte
33+
// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1360 byte
3134

3235
_exit(0);
3336
}

compiler-rt/test/lsan/TestCases/suppressions_default.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %clangxx_lsan %s -o %t
22
// RUN: %env_lsan_opts=use_registers=0:use_stacks=0 not %run %t 2>&1 | FileCheck %s
33

4+
// Fixme: remove once test passes with hwasan
5+
// UNSUPPORTED: hwasan
6+
47
#include <stdio.h>
58
#include <stdlib.h>
69

@@ -24,4 +27,4 @@ int main() {
2427
}
2528
// CHECK: Suppressions used:
2629
// CHECK: 1 666 *LSanTestLeakingFunc*
27-
// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
30+
// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)

compiler-rt/test/lsan/TestCases/suppressions_file.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// RUN: %clangxx_lsan %s -o %t
22

3+
// Fixme: remove once test passes with hwasan
4+
// UNSUPPORTED: hwasan
5+
36
// RUN: rm -f %t.supp
47
// RUN: touch %t.supp
58
// RUN: %push_to_device %t.supp %device_rundir/%t.supp
@@ -36,6 +39,6 @@ int main() {
3639
}
3740
// CHECK: Suppressions used:
3841
// CHECK: 1 666 *LSanTestLeakingFunc*
39-
// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
42+
// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
4043

41-
// NOSUPP: SUMMARY: {{.*}}Sanitizer: 2780 byte(s) leaked in 3 allocation(s).
44+
// NOSUPP: SUMMARY: {{(Leak|Address)}}Sanitizer: 2780 byte(s) leaked in 3 allocation(s).

compiler-rt/test/lsan/TestCases/swapcontext.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// We can't unwind stack if we're running coroutines on heap-allocated
22
// memory. Make sure we don't report these leaks.
33

4+
// Fixme: remove once test passes with hwasan
5+
// UNSUPPORTED: hwasan
6+
47
// RUN: %clangxx_lsan %s -o %t
58
// RUN: %env_lsan_opts= %run %t 2>&1
69
// RUN: %env_lsan_opts= not %run %t foo 2>&1 | FileCheck %s
@@ -41,4 +44,4 @@ int main(int argc, char *argv[]) {
4144
return 0;
4245
}
4346

44-
// CHECK: SUMMARY: {{.*}}Sanitizer: 2664 byte(s) leaked in 1 allocation(s)
47+
// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 2664 byte(s) leaked in 1 allocation(s)

0 commit comments

Comments
 (0)