-
Notifications
You must be signed in to change notification settings - Fork 14.6k
[NFC][UBSAN] Fix minimal UBSAN test names #137244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFC][UBSAN] Fix minimal UBSAN test names #137244
Conversation
Created using spr 1.3.4
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Vitaly Buka (vitalybuka) ChangesSame approach as in Asan. Now it's going to print:
Before it was:
Full diff: https://github.com/llvm/llvm-project/pull/137244.diff 3 Files Affected:
diff --git a/compiler-rt/test/ubsan_minimal/CMakeLists.txt b/compiler-rt/test/ubsan_minimal/CMakeLists.txt
index e214397b492dc..dea0b4f2c07f4 100644
--- a/compiler-rt/test/ubsan_minimal/CMakeLists.txt
+++ b/compiler-rt/test/ubsan_minimal/CMakeLists.txt
@@ -10,6 +10,7 @@ set(UBSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
list(APPEND UBSAN_TEST_DEPS ubsan-minimal)
foreach(arch ${UBSAN_TEST_ARCH})
+ string(TOLOWER "-${arch}-${OS_NAME}" UBSAN_TEST_CONFIG_SUFFIX)
get_test_cc_for_arch(${arch} UBSAN_TEST_TARGET_CC UBSAN_TEST_TARGET_CFLAGS)
set(CONFIG_NAME ${arch})
configure_lit_site_cfg(
diff --git a/compiler-rt/test/ubsan_minimal/lit.common.cfg.py b/compiler-rt/test/ubsan_minimal/lit.common.cfg.py
index e60aed6512fb9..115bd244b1dd8 100644
--- a/compiler-rt/test/ubsan_minimal/lit.common.cfg.py
+++ b/compiler-rt/test/ubsan_minimal/lit.common.cfg.py
@@ -16,7 +16,7 @@ def get_required_attr(config, attr_name):
# Setup source root.
config.test_source_root = os.path.dirname(__file__)
-config.name = "UBSan-Minimal-" + config.target_arch
+config.name = "UBSan-Minimal" + config.name_suffix
def build_invocation(compile_flags):
diff --git a/compiler-rt/test/ubsan_minimal/lit.site.cfg.py.in b/compiler-rt/test/ubsan_minimal/lit.site.cfg.py.in
index 10018e9c84359..83a28246d75af 100644
--- a/compiler-rt/test/ubsan_minimal/lit.site.cfg.py.in
+++ b/compiler-rt/test/ubsan_minimal/lit.site.cfg.py.in
@@ -1,5 +1,7 @@
@LIT_SITE_CFG_IN_HEADER@
+config.name_suffix = "@UBSAN_TEST_CONFIG_SUFFIX@"
+
# Tool-specific config options.
config.target_cflags = "@UBSAN_TEST_TARGET_CFLAGS@"
config.target_arch = "@UBSAN_TEST_TARGET_ARCH@"
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/8485 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/10815 Here is the relevant piece of the build log for the reference
|
Same approach as in Asan. Now it's going to print: ``` Failed Tests (2): UBSan-Minimal-i386-linux :: TestCases/icall.c UBSan-Minimal-x86_64-linux :: TestCases/icall.c ``` Before it was: ``` Failed Tests (2): UBSan-Minimal-x86_64 :: TestCases/icall.c UBSan-Minimal-x86_64 :: TestCases/icall.c ```
Same approach as in Asan. Now it's going to print: ``` Failed Tests (2): UBSan-Minimal-i386-linux :: TestCases/icall.c UBSan-Minimal-x86_64-linux :: TestCases/icall.c ``` Before it was: ``` Failed Tests (2): UBSan-Minimal-x86_64 :: TestCases/icall.c UBSan-Minimal-x86_64 :: TestCases/icall.c ```
Same approach as in Asan. Now it's going to print: ``` Failed Tests (2): UBSan-Minimal-i386-linux :: TestCases/icall.c UBSan-Minimal-x86_64-linux :: TestCases/icall.c ``` Before it was: ``` Failed Tests (2): UBSan-Minimal-x86_64 :: TestCases/icall.c UBSan-Minimal-x86_64 :: TestCases/icall.c ```
Same approach as in Asan. Now it's going to print: ``` Failed Tests (2): UBSan-Minimal-i386-linux :: TestCases/icall.c UBSan-Minimal-x86_64-linux :: TestCases/icall.c ``` Before it was: ``` Failed Tests (2): UBSan-Minimal-x86_64 :: TestCases/icall.c UBSan-Minimal-x86_64 :: TestCases/icall.c ```
Same approach as in Asan.
Now it's going to print:
Before it was: