[compiler-rt] e290152 - [ubsan][test] Enable Misc/Linux tests on all Posix systems (#111497)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 00:50:00 PDT 2024


Author: Rainer Orth
Date: 2024-10-15T09:49:57+02:00
New Revision: e29015218150e447ebc3258653dc8e8373566b6c

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

LOG: [ubsan][test] Enable Misc/Linux tests on all Posix systems (#111497)

When investigating PR #101634, it turned out that
`UBSan-Standalone-sparc :: TestCases/Misc/Linux/diag-stacktrace.cpp`
isn't Linux-specific at all. In fact, none of the
`ubsan/TestCases/Misc/Linux` tests are.

Therefore this patch moves them to `Misc/Posix` instead.

Tested on `sparc64-unknown-linux-gnu`, `sparcv9-sun-solaris2.11`,
`x86_64-pc-linux-gnu`, and `amd64-pc-solaris2.11`.

Added: 
    compiler-rt/test/ubsan/TestCases/Misc/Posix/diag-stacktrace.cpp
    compiler-rt/test/ubsan/TestCases/Misc/Posix/lit.local.cfg.py
    compiler-rt/test/ubsan/TestCases/Misc/Posix/print_stack_trace.cpp
    compiler-rt/test/ubsan/TestCases/Misc/Posix/sigaction.cpp
    compiler-rt/test/ubsan/TestCases/Misc/Posix/static-link.cpp
    compiler-rt/test/ubsan/TestCases/Misc/Posix/ubsan_options.cpp

Modified: 
    

Removed: 
    compiler-rt/test/ubsan/TestCases/Misc/Linux/diag-stacktrace.cpp
    compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg.py
    compiler-rt/test/ubsan/TestCases/Misc/Linux/print_stack_trace.cpp
    compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp
    compiler-rt/test/ubsan/TestCases/Misc/Linux/static-link.cpp
    compiler-rt/test/ubsan/TestCases/Misc/Linux/ubsan_options.cpp


################################################################################
diff  --git a/compiler-rt/test/ubsan/TestCases/Misc/Linux/diag-stacktrace.cpp b/compiler-rt/test/ubsan/TestCases/Misc/Posix/diag-stacktrace.cpp
similarity index 100%
rename from compiler-rt/test/ubsan/TestCases/Misc/Linux/diag-stacktrace.cpp
rename to compiler-rt/test/ubsan/TestCases/Misc/Posix/diag-stacktrace.cpp

diff  --git a/compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg.py b/compiler-rt/test/ubsan/TestCases/Misc/Posix/lit.local.cfg.py
similarity index 82%
rename from compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg.py
rename to compiler-rt/test/ubsan/TestCases/Misc/Posix/lit.local.cfg.py
index 603ca0365068f5..63240c39625656 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg.py
+++ b/compiler-rt/test/ubsan/TestCases/Misc/Posix/lit.local.cfg.py
@@ -6,5 +6,5 @@ def getRoot(config):
 
 root = getRoot(config)
 
-if root.host_os not in ["Linux"]:
+if root.host_os in ["Windows"]:
     config.unsupported = True

diff  --git a/compiler-rt/test/ubsan/TestCases/Misc/Linux/print_stack_trace.cpp b/compiler-rt/test/ubsan/TestCases/Misc/Posix/print_stack_trace.cpp
similarity index 100%
rename from compiler-rt/test/ubsan/TestCases/Misc/Linux/print_stack_trace.cpp
rename to compiler-rt/test/ubsan/TestCases/Misc/Posix/print_stack_trace.cpp

diff  --git a/compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp b/compiler-rt/test/ubsan/TestCases/Misc/Posix/sigaction.cpp
similarity index 100%
rename from compiler-rt/test/ubsan/TestCases/Misc/Linux/sigaction.cpp
rename to compiler-rt/test/ubsan/TestCases/Misc/Posix/sigaction.cpp

diff  --git a/compiler-rt/test/ubsan/TestCases/Misc/Linux/static-link.cpp b/compiler-rt/test/ubsan/TestCases/Misc/Posix/static-link.cpp
similarity index 100%
rename from compiler-rt/test/ubsan/TestCases/Misc/Linux/static-link.cpp
rename to compiler-rt/test/ubsan/TestCases/Misc/Posix/static-link.cpp

diff  --git a/compiler-rt/test/ubsan/TestCases/Misc/Linux/ubsan_options.cpp b/compiler-rt/test/ubsan/TestCases/Misc/Posix/ubsan_options.cpp
similarity index 100%
rename from compiler-rt/test/ubsan/TestCases/Misc/Linux/ubsan_options.cpp
rename to compiler-rt/test/ubsan/TestCases/Misc/Posix/ubsan_options.cpp


        


More information about the llvm-commits mailing list