summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Stoimenov <kstoimenov@google.com>2023-01-24 23:46:04 +0000
committerKirill Stoimenov <kstoimenov@google.com>2023-01-25 00:39:52 +0000
commitf05731434589284116cbf79be7c5571af9558405 (patch)
tree6c96afb1cb25f69d227509327390a3a1c686a71d
parent92b4946aa2f6e061bf0ab9803fc6a0657d9ce969 (diff)
downloadllvm-f05731434589284116cbf79be7c5571af9558405.tar.gz
[HWASAN] Copy some ASAN independent unit tests from ASAN to LSAN
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D142504
-rw-r--r--compiler-rt/test/lsan/TestCases/Linux/leak_check_segv.cpp (renamed from compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cpp)3
-rw-r--r--compiler-rt/test/lsan/TestCases/Linux/signal_during_stop_the_world.cpp (renamed from compiler-rt/test/asan/TestCases/Linux/signal_during_stop_the_world.cpp)2
-rw-r--r--compiler-rt/test/lsan/TestCases/lsan_annotations.cpp (renamed from compiler-rt/test/asan/TestCases/lsan_annotations.cpp)4
-rw-r--r--compiler-rt/test/lsan/TestCases/lsan_crash.cpp (renamed from compiler-rt/test/asan/TestCases/lsan_crash.cpp)2
4 files changed, 5 insertions, 6 deletions
diff --git a/compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cpp b/compiler-rt/test/lsan/TestCases/Linux/leak_check_segv.cpp
index 2a2010f7ab0f..8ca48cb4cd89 100644
--- a/compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cpp
+++ b/compiler-rt/test/lsan/TestCases/Linux/leak_check_segv.cpp
@@ -1,6 +1,5 @@
// Test that SIGSEGV during leak checking does not crash the process.
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// REQUIRES: leak-detection
+// RUN: %clangxx_lsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
diff --git a/compiler-rt/test/asan/TestCases/Linux/signal_during_stop_the_world.cpp b/compiler-rt/test/lsan/TestCases/Linux/signal_during_stop_the_world.cpp
index b1a41fe20c05..35019c905059 100644
--- a/compiler-rt/test/asan/TestCases/Linux/signal_during_stop_the_world.cpp
+++ b/compiler-rt/test/lsan/TestCases/Linux/signal_during_stop_the_world.cpp
@@ -2,7 +2,7 @@
// Historically StopTheWorld crashed because did not handle EINTR properly.
// The test is somewhat convoluted, but that's what caused crashes previously.
-// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_lsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
#include <stdio.h>
#include <stdlib.h>
diff --git a/compiler-rt/test/asan/TestCases/lsan_annotations.cpp b/compiler-rt/test/lsan/TestCases/lsan_annotations.cpp
index 158c2fdf9f48..044f9673c0d2 100644
--- a/compiler-rt/test/asan/TestCases/lsan_annotations.cpp
+++ b/compiler-rt/test/lsan/TestCases/lsan_annotations.cpp
@@ -1,6 +1,6 @@
// Check that LSan annotations work fine.
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t
+// RUN: %clangxx_lsan -O0 %s -o %t && %run %t
+// RUN: %clangxx_lsan -O3 %s -o %t && %run %t
#include <sanitizer/lsan_interface.h>
#include <stdlib.h>
diff --git a/compiler-rt/test/asan/TestCases/lsan_crash.cpp b/compiler-rt/test/lsan/TestCases/lsan_crash.cpp
index 8ea9e74c8cb2..14f9d872b260 100644
--- a/compiler-rt/test/asan/TestCases/lsan_crash.cpp
+++ b/compiler-rt/test/lsan/TestCases/lsan_crash.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -O2 %s --std=c++14 -o %t && %run %t
+// RUN: %clangxx_lsan -O2 %s --std=c++14 -o %t && %run %t
#include <atomic>
#include <memory>