[compiler-rt] ba148a1 - [compiler-rt] [test] [ubsan] Mark failing tests as unsupported for mingw configs

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 13:07:15 PDT 2023


Author: Martin Storsjö
Date: 2023-04-19T23:05:30+03:00
New Revision: ba148a1c86775bf6e6ab14c65011acc6555ef11e

URL: https://github.com/llvm/llvm-project/commit/ba148a1c86775bf6e6ab14c65011acc6555ef11e
DIFF: https://github.com/llvm/llvm-project/commit/ba148a1c86775bf6e6ab14c65011acc6555ef11e.diff

LOG: [compiler-rt] [test] [ubsan] Mark failing tests as unsupported for mingw configs

All of these are already unsupported for MSVC style configs. For
some cases, simplify the regex to match any windows triple, while
for others, mention windows-msvc and windows-gnu specifically,
if they are separate cases that happen to fail for different reasons.

-fsanitize=function is unsupported both in mingw and MSVC modes.

The vptr tests expect to get demangled C++ type info names, but
Itanium C++ typenames don't get demangled by ubsan on Windows.

The test that tries to build a .so doesn't work as such on
Windows.

While mingw toolchains do support weak symbols, the relevant
sanitizer symbols aren't made weak on Windows.

Differential Revision: https://reviews.llvm.org/D148163

Added: 
    

Modified: 
    compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
    compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
    compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
    compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
    compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp b/compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
index 0a705cc4c1c6b..d3de725773d9c 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
+++ b/compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
@@ -4,7 +4,7 @@
 // __ubsan_on_report is not defined as weak. Redefining it here isn't supported
 // on Windows.
 //
-// UNSUPPORTED: target={{.*windows-msvc.*}}
+// UNSUPPORTED: target={{.*windows.*}}
 // Linkage issue
 // XFAIL: target={{.*openbsd.*}}
 

diff  --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
index 06eb796a46bb6..567db7a872cc1 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
@@ -4,7 +4,7 @@
 // RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK $(%run %t-unique UNIQUE)
 // Verify that we can disable symbolization if needed:
 // RUN: %env_ubsan_opts=symbolize=0 %run %t 2>&1 | FileCheck %s --check-prefix=NOSYM $(%run %t-unique NOSYM-UNIQUE)
-// XFAIL: target={{.*windows-msvc.*}}
+// XFAIL: target={{.*windows.*}}
 // Unsupported function flag
 // UNSUPPORTED: target={{.*openbsd.*}}
 

diff  --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
index 6686415a222cf..604d0d6232bf9 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
@@ -3,7 +3,7 @@
 // RUN: %run %t
 //
 // REQUIRES: cxxabi
-// UNSUPPORTED: target={{.*windows-msvc.*}}
+// UNSUPPORTED: target={{.*windows.*}}
 
 struct X {
   virtual ~X() {}

diff  --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
index 80a96cb042ae2..9d44f0230e924 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
@@ -6,6 +6,8 @@
 // UNSUPPORTED: target={{.*windows-msvc.*}}
 // Nested crash reported
 // UNSUPPORTED: target={{.*freebsd.*}}
+// FIXME: Itanium demangling isn't done for the type names on MinGW targets.
+// XFAIL: target={{.*windows-gnu.*}}
 
 struct S { virtual int f() { return 0; } };
 struct T : virtual S {};

diff  --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
index 70c93440a0e04..2d0e48cd84f3c 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
@@ -44,6 +44,10 @@
 // UNSUPPORTED: target={{.*openbsd.*}}
 // Compilation error
 // UNSUPPORTED: target={{.*freebsd.*}}
+// FIXME: For MinGW targets, the vptr tests do generally work, but Itanium
+// demangling isn't done for the type names. The "(echo ..." line fails to
+// be handled by the shell.
+// XFAIL: target={{.*windows-gnu.*}}
 #include <new>
 #include <typeinfo>
 #include <assert.h>


        


More information about the llvm-commits mailing list