Skip to content

Commit f057314

Browse files
committed
[HWASAN] Copy some ASAN independent unit tests from ASAN to LSAN
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D142504
1 parent 92b4946 commit f057314

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cpp renamed to compiler-rt/test/lsan/TestCases/Linux/leak_check_segv.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Test that SIGSEGV during leak checking does not crash the process.
2-
// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
3-
// REQUIRES: leak-detection
2+
// RUN: %clangxx_lsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
43
#include <stdlib.h>
54
#include <stdio.h>
65
#include <sys/mman.h>

compiler-rt/test/asan/TestCases/Linux/signal_during_stop_the_world.cpp renamed to compiler-rt/test/lsan/TestCases/Linux/signal_during_stop_the_world.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Historically StopTheWorld crashed because did not handle EINTR properly.
33
// The test is somewhat convoluted, but that's what caused crashes previously.
44

5-
// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
5+
// RUN: %clangxx_lsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
66

77
#include <stdio.h>
88
#include <stdlib.h>

compiler-rt/test/asan/TestCases/lsan_annotations.cpp renamed to compiler-rt/test/lsan/TestCases/lsan_annotations.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Check that LSan annotations work fine.
2-
// RUN: %clangxx_asan -O0 %s -o %t && %run %t
3-
// RUN: %clangxx_asan -O3 %s -o %t && %run %t
2+
// RUN: %clangxx_lsan -O0 %s -o %t && %run %t
3+
// RUN: %clangxx_lsan -O3 %s -o %t && %run %t
44

55
#include <sanitizer/lsan_interface.h>
66
#include <stdlib.h>

compiler-rt/test/asan/TestCases/lsan_crash.cpp renamed to compiler-rt/test/lsan/TestCases/lsan_crash.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx_asan -O2 %s --std=c++14 -o %t && %run %t
1+
// RUN: %clangxx_lsan -O2 %s --std=c++14 -o %t && %run %t
22

33
#include <atomic>
44
#include <memory>

0 commit comments

Comments
 (0)