[llvm] [BOLT] Add missing system-linux requirements to tests (PR #172968)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 19 00:04:20 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-bolt
Author: Gergely Bálint (bgergely0)
<details>
<summary>Changes</summary>
Many lit tests are failing on macOS, as they are linux-specific,
but not using the "REQUIRES: system-linux" setting.
This patch adds the missing requirements to tests failing on macOS.
---
Full diff: https://github.com/llvm/llvm-project/pull/172968.diff
8 Files Affected:
- (modified) bolt/test/AArch64/compact-code-model.s (+2)
- (modified) bolt/test/dump-dot-func.test (+4-2)
- (modified) bolt/test/dwarf5-missing-dwo.c (+2)
- (modified) bolt/test/dwo-name-retrieving.test (+2)
- (modified) bolt/test/indirect-goto-relocs.test (+2)
- (modified) bolt/test/lsda-section-name.cpp (+4-3)
- (modified) bolt/test/timers.c (+3)
- (modified) bolt/test/yaml-profile-kind.c (+3)
``````````diff
diff --git a/bolt/test/AArch64/compact-code-model.s b/bolt/test/AArch64/compact-code-model.s
index 0805302a88598..d5d10c6bbd13f 100644
--- a/bolt/test/AArch64/compact-code-model.s
+++ b/bolt/test/AArch64/compact-code-model.s
@@ -1,6 +1,8 @@
## Check that llvm-bolt successfully relaxes branches for compact (<128MB) code
## model.
+# REQUIRES: system-linux
+
# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o
# RUN: link_fdata %s %t.o %t.fdata
# RUN: llvm-strip --strip-unneeded %t.o
diff --git a/bolt/test/dump-dot-func.test b/bolt/test/dump-dot-func.test
index f05bfc195db45..c1a44830c6327 100644
--- a/bolt/test/dump-dot-func.test
+++ b/bolt/test/dump-dot-func.test
@@ -1,6 +1,8 @@
-# Test the --dump-dot-func option with multiple functions
+# Test the --dump-dot-func option with multiple functions
# (includes tests for both mangled/unmangled names)
+REQUIRES: system-linux
+
RUN: %clangxx %p/Inputs/multi-func.cpp -o %t.exe -Wl,-q
# Test 1: --dump-dot-func with specific function name (mangled)
@@ -49,4 +51,4 @@ ALL: BOLT-INFO: dumping CFG to main-00_build-cfg.dot
MAIN-UNMANGLED: BOLT-INFO: dumping CFG to main-00_build-cfg.dot
MAIN-UNMANGLED-NOT: BOLT-INFO: dumping CFG to _Z3addii-00_build-cfg.dot
-MAIN-UNMANGLED-NOT: BOLT-INFO: dumping CFG to _Z8multiplyii-00_build-cfg.dot
\ No newline at end of file
+MAIN-UNMANGLED-NOT: BOLT-INFO: dumping CFG to _Z8multiplyii-00_build-cfg.dot
diff --git a/bolt/test/dwarf5-missing-dwo.c b/bolt/test/dwarf5-missing-dwo.c
index 25de1a53aa5ac..84fb06433a9e8 100644
--- a/bolt/test/dwarf5-missing-dwo.c
+++ b/bolt/test/dwarf5-missing-dwo.c
@@ -1,6 +1,8 @@
// Check that llvm-bolt correctly reports a missing DWO file while updating
// debug info.
//
+// REQUIRES: system-linux
+//
// RUN: %clang %cflags -g -dwarf5 -gsplit-dwarf=single -c %s -o %t.o
// RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
// RUN: rm %t.o
diff --git a/bolt/test/dwo-name-retrieving.test b/bolt/test/dwo-name-retrieving.test
index 39193ccc6637a..a797f10c95b6a 100755
--- a/bolt/test/dwo-name-retrieving.test
+++ b/bolt/test/dwo-name-retrieving.test
@@ -1,6 +1,8 @@
## Test DWO retrieval via relative path with a missing CompDir.
## Also, verify no crash for an absolute DWOName path.
+# REQUIRES: system-linux
+
## The case where DWOName is a relative path, and debug compilation directory does not exist.
# RUN: rm -rf %t && mkdir -p %t && cd %t
# RUN: %clang %cflags -g -gsplit-dwarf -fdebug-compilation-dir=/path/does/not/exist %p/Inputs/hello.c -o main.exe
diff --git a/bolt/test/indirect-goto-relocs.test b/bolt/test/indirect-goto-relocs.test
index 25da99b3ad3a9..e28d64135b44e 100644
--- a/bolt/test/indirect-goto-relocs.test
+++ b/bolt/test/indirect-goto-relocs.test
@@ -1,6 +1,8 @@
// This test checks that BOLT creates entry points from sources
// that use indirect goto.
+REQUIRES: system-linux
+
RUN: %clang %cflags -pie %S/Inputs/indirect_goto.c -o %t.exe -Wl,-q
RUN: llvm-bolt %t.exe -o %t.bolt --print-cfg | FileCheck --check-prefix=CHECK-PIE %s
diff --git a/bolt/test/lsda-section-name.cpp b/bolt/test/lsda-section-name.cpp
index e91d0ac605974..15f8795e85023 100644
--- a/bolt/test/lsda-section-name.cpp
+++ b/bolt/test/lsda-section-name.cpp
@@ -1,11 +1,12 @@
// This test check that LSDA section named by .gcc_except_table.main is
// disassembled by BOLT.
+// REQUIRES: system-linux
// RUN: %clangxx %cxxflags -O3 -no-pie -c %s -o %t.o
// RUN: %clangxx %cxxflags -O3 -no-pie -fuse-ld=lld %t.o -o %t
-// RUN: llvm-objcopy --rename-section .gcc_except_table=.gcc_except_table.main %t
-// RUN: llvm-readelf -SW %t | FileCheck %s
-// RUN: llvm-bolt %t -o %t.bolt
+// RUN: llvm-objcopy --rename-section \
+// RUN: .gcc_except_table=.gcc_except_table.main %t
+// RUN: llvm-readelf -SW %t | FileCheck %s RUN: llvm-bolt %t -o %t.bolt
// CHECK: .gcc_except_table.main
diff --git a/bolt/test/timers.c b/bolt/test/timers.c
index 59bd0d573dba0..114cc8b8428dd 100644
--- a/bolt/test/timers.c
+++ b/bolt/test/timers.c
@@ -1,4 +1,7 @@
// This test checks timers for metadata manager phases.
+
+// REQUIRES: system-linux
+
// RUN: %clang %cflags %s -o %t.exe
// RUN: link_fdata %s %t.exe %t.fdata
// RUN: llvm-bolt %t.exe -o %t.null --data %t.fdata -w %t.yaml --time-rewrite \
diff --git a/bolt/test/yaml-profile-kind.c b/bolt/test/yaml-profile-kind.c
index 3bf2a2619f01f..c894de8428f03 100644
--- a/bolt/test/yaml-profile-kind.c
+++ b/bolt/test/yaml-profile-kind.c
@@ -1,4 +1,7 @@
/* This test checks the handling of YAML profile with different block orders.
+
+# REQUIRES: system-linux
+
# RUN: %clang %cflags %s -o %t.exe
# RUN: link_fdata %s %t.exe %t.fdata
# RUN: llvm-bolt %t.exe -o %t.null -data %t.fdata -w %t.yaml
``````````
</details>
https://github.com/llvm/llvm-project/pull/172968
More information about the llvm-commits
mailing list