[BOLT] Add missing system-linux requirements to tests (#172968)

Several 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.
This commit is contained in:
Gergely Bálint 2025-12-19 11:16:18 +01:00 committed by GitHub
parent 43bd2e064f
commit b6d188a7e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 21 additions and 3 deletions

View File

@ -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

View File

@ -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
MAIN-UNMANGLED-NOT: BOLT-INFO: dumping CFG to _Z8multiplyii-00_build-cfg.dot

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,9 +1,11 @@
// 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-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

View File

@ -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 \

View File

@ -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