[compiler-rt] f057314 - [HWASAN] Copy some ASAN independent unit tests from ASAN to LSAN
Kirill Stoimenov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 16:40:03 PST 2023
Author: Kirill Stoimenov
Date: 2023-01-25T00:39:52Z
New Revision: f05731434589284116cbf79be7c5571af9558405
URL: https://github.com/llvm/llvm-project/commit/f05731434589284116cbf79be7c5571af9558405
DIFF: https://github.com/llvm/llvm-project/commit/f05731434589284116cbf79be7c5571af9558405.diff
LOG: [HWASAN] Copy some ASAN independent unit tests from ASAN to LSAN
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D142504
Added:
compiler-rt/test/lsan/TestCases/Linux/leak_check_segv.cpp
compiler-rt/test/lsan/TestCases/Linux/signal_during_stop_the_world.cpp
compiler-rt/test/lsan/TestCases/lsan_annotations.cpp
compiler-rt/test/lsan/TestCases/lsan_crash.cpp
Modified:
Removed:
compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cpp
compiler-rt/test/asan/TestCases/Linux/signal_during_stop_the_world.cpp
compiler-rt/test/asan/TestCases/lsan_annotations.cpp
compiler-rt/test/asan/TestCases/lsan_crash.cpp
################################################################################
diff --git a/compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cpp b/compiler-rt/test/lsan/TestCases/Linux/leak_check_segv.cpp
similarity index 87%
rename from compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cpp
rename to compiler-rt/test/lsan/TestCases/Linux/leak_check_segv.cpp
index 2a2010f7ab0fe..8ca48cb4cd89a 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
similarity index 95%
rename from compiler-rt/test/asan/TestCases/Linux/signal_during_stop_the_world.cpp
rename to compiler-rt/test/lsan/TestCases/Linux/signal_during_stop_the_world.cpp
index b1a41fe20c05d..35019c905059b 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
similarity index 74%
rename from compiler-rt/test/asan/TestCases/lsan_annotations.cpp
rename to compiler-rt/test/lsan/TestCases/lsan_annotations.cpp
index 158c2fdf9f481..044f9673c0d21 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
similarity index 89%
rename from compiler-rt/test/asan/TestCases/lsan_crash.cpp
rename to compiler-rt/test/lsan/TestCases/lsan_crash.cpp
index 8ea9e74c8cb25..14f9d872b2602 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>
More information about the llvm-commits
mailing list