https://github.com/arrowd updated https://github.com/llvm/llvm-project/pull/167642
>From 087dad9d9eb5a7e0280e7a1217cc1ce6b2a7a196 Mon Sep 17 00:00:00 2001 From: Gleb Popov <[email protected]> Date: Tue, 30 Sep 2025 13:59:25 +0300 Subject: [PATCH] libunwind: Remove OS requirements from tests to make them run on more OSes While at it, replace "echo -ne" with "printf" for more compatibility. --- libunwind/test/aarch64_vg_unwind.pass.cpp | 2 +- libunwind/test/aarch64_za_unwind.pass.cpp | 2 +- libunwind/test/bad_unwind_info.pass.cpp | 2 +- libunwind/test/eh_frame_fde_pc_range.pass.cpp | 3 +-- libunwind/test/floatregister.pass.cpp | 2 +- libunwind/test/forceunwind.pass.cpp | 2 -- libunwind/test/remember_state_leak.pass.sh.s | 2 +- libunwind/test/signal_unwind.pass.cpp | 2 +- libunwind/test/unwind_leaffunction.pass.cpp | 2 +- libunwind/test/unwind_scalable_vectors.pass.cpp | 2 +- 10 files changed, 9 insertions(+), 12 deletions(-) diff --git a/libunwind/test/aarch64_vg_unwind.pass.cpp b/libunwind/test/aarch64_vg_unwind.pass.cpp index 1c139a7ae9e41..c6b040c7d8664 100644 --- a/libunwind/test/aarch64_vg_unwind.pass.cpp +++ b/libunwind/test/aarch64_vg_unwind.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: linux && target={{aarch64-.+}} +// REQUIRES: target={{aarch64-.+}} #include <libunwind.h> #include <stdlib.h> diff --git a/libunwind/test/aarch64_za_unwind.pass.cpp b/libunwind/test/aarch64_za_unwind.pass.cpp index 2985bb8d298de..549cc41dd1733 100644 --- a/libunwind/test/aarch64_za_unwind.pass.cpp +++ b/libunwind/test/aarch64_za_unwind.pass.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: linux && target={{aarch64-.+}} +// REQUIRES: target={{aarch64-.+}} #include <libunwind.h> #include <stdint.h> diff --git a/libunwind/test/bad_unwind_info.pass.cpp b/libunwind/test/bad_unwind_info.pass.cpp index 272a83f64a611..92a4a2d328d72 100644 --- a/libunwind/test/bad_unwind_info.pass.cpp +++ b/libunwind/test/bad_unwind_info.pass.cpp @@ -10,7 +10,7 @@ // Ensure that libunwind doesn't crash on invalid info; the Linux aarch64 // sigreturn frame check would previously attempt to access invalid memory in // this scenario. -// REQUIRES: target={{(aarch64|s390x|x86_64)-.+linux.*}} +// REQUIRES: target={{(aarch64|s390x|x86_64)-.+}} // GCC doesn't support __attribute__((naked)) on AArch64. // UNSUPPORTED: gcc diff --git a/libunwind/test/eh_frame_fde_pc_range.pass.cpp b/libunwind/test/eh_frame_fde_pc_range.pass.cpp index 795ce66806f28..eb0b5db183759 100644 --- a/libunwind/test/eh_frame_fde_pc_range.pass.cpp +++ b/libunwind/test/eh_frame_fde_pc_range.pass.cpp @@ -13,7 +13,6 @@ // clang-format off -// REQUIRES: target={{x86_64-.+-linux-gnu}} // REQUIRES: objcopy-available // TODO: Figure out why this fails with Memory Sanitizer. @@ -21,7 +20,7 @@ // RUN: %{build} // RUN: %{objcopy} --dump-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe -// RUN: echo -ne '\xFF' | dd of=%t_ehf_hdr.bin bs=1 seek=2 count=2 conv=notrunc status=none +// RUN: printf '\377' | dd of=%t_ehf_hdr.bin bs=1 seek=2 count=2 conv=notrunc status=none // RUN: %{objcopy} --update-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe // RUN: %{exec} %t.exe diff --git a/libunwind/test/floatregister.pass.cpp b/libunwind/test/floatregister.pass.cpp index 018b792bd5f1e..ae9b4fdc8dd8e 100644 --- a/libunwind/test/floatregister.pass.cpp +++ b/libunwind/test/floatregister.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: linux && target={{aarch64-.+}} +// REQUIRES: target={{aarch64-.+}} // Basic test for float registers number are accepted. diff --git a/libunwind/test/forceunwind.pass.cpp b/libunwind/test/forceunwind.pass.cpp index 9e032fc680806..2c1dc16ef697d 100644 --- a/libunwind/test/forceunwind.pass.cpp +++ b/libunwind/test/forceunwind.pass.cpp @@ -7,8 +7,6 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: linux - // TODO: Figure out why this fails with Memory Sanitizer. // XFAIL: msan diff --git a/libunwind/test/remember_state_leak.pass.sh.s b/libunwind/test/remember_state_leak.pass.sh.s index d3335cf82290b..a224d8cf91d89 100644 --- a/libunwind/test/remember_state_leak.pass.sh.s +++ b/libunwind/test/remember_state_leak.pass.sh.s @@ -6,7 +6,7 @@ # #===------------------------------------------------------------------------===# -# REQUIRES: target={{x86_64-.+-linux-gnu}} +# REQUIRES: target={{x86_64-.+}} # Inline assembly isn't supported by Memory Sanitizer # UNSUPPORTED: msan diff --git a/libunwind/test/signal_unwind.pass.cpp b/libunwind/test/signal_unwind.pass.cpp index 4de271ecb886b..4e14c2c350cc7 100644 --- a/libunwind/test/signal_unwind.pass.cpp +++ b/libunwind/test/signal_unwind.pass.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // Ensure that the unwinder can cope with the signal handler. -// REQUIRES: target={{(aarch64|loongarch64|riscv64|s390x|x86_64)-.+linux.*}} +// REQUIRES: target={{(aarch64|loongarch64|riscv64|s390x|x86_64)-.+}} // TODO: Figure out why this fails with Memory Sanitizer. // XFAIL: msan diff --git a/libunwind/test/unwind_leaffunction.pass.cpp b/libunwind/test/unwind_leaffunction.pass.cpp index d336c159c131b..367d8242334f1 100644 --- a/libunwind/test/unwind_leaffunction.pass.cpp +++ b/libunwind/test/unwind_leaffunction.pass.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // Ensure that leaf function can be unwund. -// REQUIRES: target={{(aarch64|loongarch64|riscv64|s390x|x86_64)-.+linux.*}} +// REQUIRES: target={{(aarch64|loongarch64|riscv64|s390x|x86_64)-.+}} // TODO: Figure out why this fails with Memory Sanitizer. // XFAIL: msan diff --git a/libunwind/test/unwind_scalable_vectors.pass.cpp b/libunwind/test/unwind_scalable_vectors.pass.cpp index 57ef4d78244c5..38d8bd5e002d1 100644 --- a/libunwind/test/unwind_scalable_vectors.pass.cpp +++ b/libunwind/test/unwind_scalable_vectors.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: linux && target={{riscv64-.+}} +// REQUIRES: target={{riscv64-.+}} #undef NDEBUG #include <assert.h> _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
