summaryrefslogtreecommitdiff
path: root/compiler-rt
diff options
context:
space:
mode:
authorAlvin Wong <alvin@alvinhc.com>2023-04-06 21:24:06 +0800
committerAlvin Wong <alvin@alvinhc.com>2023-05-16 19:53:49 +0800
commit65abcf6c0ce1315fa0404f5cd0f6b093c038794e (patch)
treed3b43f1c950c9892a88f215f1130831ebf08aed2 /compiler-rt
parent51015af773775160c22df9a8252d34270f2698a2 (diff)
downloadllvm-65abcf6c0ce1315fa0404f5cd0f6b093c038794e.tar.gz
[asan][test][win] Move MSVC-specific tests into a subdir
This moves all but one remaining tests which use clang-cl and test MSVC-specific behaviour into its own subdirectory. `dll_host.cpp` test is excluded from the move because other tests also depend on its source file, making it not MSVC-specific. Differential Revision: https://reviews.llvm.org/D150271
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/coverage-dll-stdio.cpp (renamed from compiler-rt/test/asan/TestCases/Windows/coverage-dll-stdio.cpp)4
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/dll_and_lib.cpp (renamed from compiler-rt/test/asan/TestCases/Windows/dll_and_lib.cpp)2
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/dll_cerr.cpp (renamed from compiler-rt/test/asan/TestCases/Windows/dll_cerr.cpp)4
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/dll_control_c.cpp (renamed from compiler-rt/test/asan/TestCases/Windows/dll_control_c.cpp)4
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp (renamed from compiler-rt/test/asan/TestCases/Windows/dll_large_function.cpp)2
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/dll_seh.cpp (renamed from compiler-rt/test/asan/TestCases/Windows/dll_seh.cpp)4
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/iostream_sbo.cpp (renamed from compiler-rt/test/asan/TestCases/Windows/iostream_sbo.cpp)4
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/lit.local.cfg.py4
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/seh.cpp (renamed from compiler-rt/test/asan/TestCases/Windows/seh.cpp)2
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/tls_init.cpp (renamed from compiler-rt/test/asan/TestCases/Windows/tls_init.cpp)2
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/use_after_return_linkage.cpp (renamed from compiler-rt/test/asan/TestCases/Windows/use_after_return_linkage.cpp)2
11 files changed, 9 insertions, 25 deletions
diff --git a/compiler-rt/test/asan/TestCases/Windows/coverage-dll-stdio.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/coverage-dll-stdio.cpp
index 2a880bae04c7..5c597c9d12f2 100644
--- a/compiler-rt/test/asan/TestCases/Windows/coverage-dll-stdio.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/coverage-dll-stdio.cpp
@@ -1,10 +1,8 @@
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
// Test that coverage and MSVC CRT stdio work from a DLL. This ensures that the
// __local_stdio_printf_options function isn't instrumented for coverage.
// RUN: rm -rf %t && mkdir %t && cd %t
-// RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -Od %p/dll_host.cpp -Fet.exe
+// RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -Od %p/../dll_host.cpp -Fet.exe
// RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -LD -Od %s -Fet.dll
// RUN: %run ./t.exe t.dll 2>&1 | FileCheck %s
diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_and_lib.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_and_lib.cpp
index 0346ecfb7735..96fae6b1d603 100644
--- a/compiler-rt/test/asan/TestCases/Windows/dll_and_lib.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_and_lib.cpp
@@ -1,5 +1,3 @@
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
// Just make sure we can link an implib into another DLL
// This used to fail between r212699 and r212814.
// RUN: %clang_cl_asan -DCONFIG=1 %s -c -Fo%t.1.obj
diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_cerr.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_cerr.cpp
index ff84090d046a..2be2c627bd27 100644
--- a/compiler-rt/test/asan/TestCases/Windows/dll_cerr.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_cerr.cpp
@@ -1,6 +1,4 @@
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
-// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
+// RUN: %clang_cl_asan -Od %p/../dll_host.cpp -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: %run %t %t.dll 2>&1 | FileCheck %s
diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_control_c.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_control_c.cpp
index f5127e75d3ff..0faa2ffbc2fe 100644
--- a/compiler-rt/test/asan/TestCases/Windows/dll_control_c.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_control_c.cpp
@@ -1,6 +1,4 @@
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
-// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
+// RUN: %clang_cl_asan -Od %p/../dll_host.cpp -Fe%t
// RUN: %clang_cl_asan -LD -O2 %s -Fe%t.dll
// RUNX: %run %t %t.dll 2>&1 | FileCheck %s
diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_large_function.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp
index c047a5292f94..788488dbb8ed 100644
--- a/compiler-rt/test/asan/TestCases/Windows/dll_large_function.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp
@@ -1,5 +1,3 @@
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
// Make sure we can link a DLL with large functions which would mean
// functions such as __asan_loadN and __asan_storeN will be called
// from the DLL. We simulate the large function with
diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_seh.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_seh.cpp
index 009351dd7227..9a29bee75c1b 100644
--- a/compiler-rt/test/asan/TestCases/Windows/dll_seh.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_seh.cpp
@@ -1,6 +1,4 @@
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
-// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
+// RUN: %clang_cl_asan -Od %p/../dll_host.cpp -Fe%t
//
// Check both -GS and -GS- builds:
// RUN: %clang_cl_asan -GS -LD -Od %s -Fe%t.dll
diff --git a/compiler-rt/test/asan/TestCases/Windows/iostream_sbo.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/iostream_sbo.cpp
index eea38b82e015..3d4158f8c331 100644
--- a/compiler-rt/test/asan/TestCases/Windows/iostream_sbo.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/iostream_sbo.cpp
@@ -1,11 +1,9 @@
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
// First, check this works with the default ignorelist:
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: echo "42" | %run %t 2>&1 | FileCheck %s
//
// Then, make sure it still works when a user uses their own ignorelist file:
-// RUN: %clang_cl_asan -Od %s -fsanitize-ignorelist=%p/../Helpers/initialization-ignorelist.txt -Fe%t2
+// RUN: %clang_cl_asan -Od %s -fsanitize-ignorelist=%p/../../Helpers/initialization-ignorelist.txt -Fe%t2
// RUN: echo "42" | %run %t2 2>&1 | FileCheck %s
#include <iostream>
diff --git a/compiler-rt/test/asan/TestCases/Windows/msvc/lit.local.cfg.py b/compiler-rt/test/asan/TestCases/Windows/msvc/lit.local.cfg.py
new file mode 100644
index 000000000000..91979845cb23
--- /dev/null
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/lit.local.cfg.py
@@ -0,0 +1,4 @@
+import re
+
+if not re.match(r'.*-windows-msvc$', config.target_triple):
+ config.unsupported = True
diff --git a/compiler-rt/test/asan/TestCases/Windows/seh.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/seh.cpp
index a6cb048a07a6..4cb0c55bc773 100644
--- a/compiler-rt/test/asan/TestCases/Windows/seh.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/seh.cpp
@@ -1,5 +1,3 @@
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
// Make sure that ASan works with SEH in both Clang and MSVC. MSVC uses a
// different EH personality depending on the -GS setting, so test both -GS+ and
// -GS-.
diff --git a/compiler-rt/test/asan/TestCases/Windows/tls_init.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/tls_init.cpp
index 5cf0768a7fa4..a8569f8025c8 100644
--- a/compiler-rt/test/asan/TestCases/Windows/tls_init.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/tls_init.cpp
@@ -1,5 +1,3 @@
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
// RUN: %clang_cl_asan %s -Fe%t.exe /MD
// RUN: %run %t.exe | FileCheck %s
diff --git a/compiler-rt/test/asan/TestCases/Windows/use_after_return_linkage.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/use_after_return_linkage.cpp
index 8f92a149fe0a..cacf461b4f33 100644
--- a/compiler-rt/test/asan/TestCases/Windows/use_after_return_linkage.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/use_after_return_linkage.cpp
@@ -1,5 +1,3 @@
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
// Make sure LIBCMT doesn't accidentally get added to the list of DEFAULTLIB
// directives.