[llvm] [BOLT][AArch64] Skip gadget pacret test on RHEL8 (PR #145527)
Paschalis Mpeis via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 24 08:15:04 PDT 2025
https://github.com/paschalis-mpeis updated https://github.com/llvm/llvm-project/pull/145527
>From e24abdec272f3bbf5307b0afde3df40ab0ca27a4 Mon Sep 17 00:00:00 2001
From: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
Date: Tue, 24 Jun 2025 16:03:05 +0100
Subject: [PATCH 1/2] [BOLT][AArch64] Skip gadget pacret test on RHEL8
---
bolt/test/binary-analysis/AArch64/gs-pacret-autiasp.s | 3 ++-
bolt/test/lit.cfg.py | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/bolt/test/binary-analysis/AArch64/gs-pacret-autiasp.s b/bolt/test/binary-analysis/AArch64/gs-pacret-autiasp.s
index 284f0bea607a5..855fdb6465479 100644
--- a/bolt/test/binary-analysis/AArch64/gs-pacret-autiasp.s
+++ b/bolt/test/binary-analysis/AArch64/gs-pacret-autiasp.s
@@ -1,3 +1,5 @@
+// REQUIRES: !rhel8
+
// RUN: %clang %cflags -march=armv9.5-a+pauth-lr -mbranch-protection=pac-ret %s %p/../../Inputs/asm_main.c -o %t.exe
// RUN: llvm-bolt-binary-analysis --scanners=pacret %t.exe 2>&1 | FileCheck %s
@@ -883,4 +885,3 @@ f_autib171615:
// CHECK-NEXT: {{[0-9a-f]+}}: ret
ret
.size f_autib171615, .-f_autib171615
-
diff --git a/bolt/test/lit.cfg.py b/bolt/test/lit.cfg.py
index 0d05229be2bf3..820a910430920 100644
--- a/bolt/test/lit.cfg.py
+++ b/bolt/test/lit.cfg.py
@@ -75,6 +75,11 @@
if lit.util.which("fuser"):
config.available_features.add("fuser")
+rhel_release="/etc/redhat-release"
+if os.path.exists(rhel_release) and \
+ "release 8" in open(rhel_release).read().lower():
+ config.available_features.add("rhel8")
+
llvm_config.use_default_substitutions()
llvm_config.config.environment["CLANG"] = config.bolt_clang
>From 8554d0905faf6c9f309564b04263e4b894d8b199 Mon Sep 17 00:00:00 2001
From: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
Date: Tue, 24 Jun 2025 16:14:36 +0100
Subject: [PATCH 2/2] py code formatter
---
bolt/test/lit.cfg.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/bolt/test/lit.cfg.py b/bolt/test/lit.cfg.py
index 820a910430920..4361f5ad5b058 100644
--- a/bolt/test/lit.cfg.py
+++ b/bolt/test/lit.cfg.py
@@ -76,8 +76,7 @@
config.available_features.add("fuser")
rhel_release="/etc/redhat-release"
-if os.path.exists(rhel_release) and \
- "release 8" in open(rhel_release).read().lower():
+if os.path.exists(rhel_release) and "release 8" in open(rhel_release).read().lower():
config.available_features.add("rhel8")
llvm_config.use_default_substitutions()
More information about the llvm-commits
mailing list