https://github.com/arrowd updated https://github.com/llvm/llvm-project/pull/167642
>From 5b3cafb56c9cc377c734ba5abcb7231d0673f440 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 | 3 ++- libunwind/test/aarch64_za_unwind.pass.cpp | 3 ++- libunwind/test/bad_unwind_info.pass.cpp | 3 ++- libunwind/test/eh_frame_fde_pc_range.pass.cpp | 4 ++-- libunwind/test/floatregister.pass.cpp | 3 ++- libunwind/test/forceunwind.pass.cpp | 3 ++- libunwind/test/remember_state_leak.pass.sh.s | 3 ++- libunwind/test/signal_unwind.pass.cpp | 3 ++- libunwind/test/unwind_leaffunction.pass.cpp | 3 ++- libunwind/test/unwind_scalable_vectors.pass.cpp | 2 +- 10 files changed, 19 insertions(+), 11 deletions(-) diff --git a/libunwind/test/aarch64_vg_unwind.pass.cpp b/libunwind/test/aarch64_vg_unwind.pass.cpp index 1c139a7ae9e41..5abc9fd4ef0dc 100644 --- a/libunwind/test/aarch64_vg_unwind.pass.cpp +++ b/libunwind/test/aarch64_vg_unwind.pass.cpp @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: linux && target={{aarch64-.+}} +// REQUIRES: target-aarch64 +// UNSUPPORTED: system-windows #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..1329e750d80e8 100644 --- a/libunwind/test/aarch64_za_unwind.pass.cpp +++ b/libunwind/test/aarch64_za_unwind.pass.cpp @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: linux && target={{aarch64-.+}} +// REQUIRES: target-aarch64 +// UNSUPPORTED: system-windows #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..4dd95bf30b055 100644 --- a/libunwind/test/bad_unwind_info.pass.cpp +++ b/libunwind/test/bad_unwind_info.pass.cpp @@ -10,7 +10,8 @@ // 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)-.+}} +// UNSUPPORTED: system-windows // 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..41bed928872c2 100644 --- a/libunwind/test/eh_frame_fde_pc_range.pass.cpp +++ b/libunwind/test/eh_frame_fde_pc_range.pass.cpp @@ -13,7 +13,7 @@ // clang-format off -// REQUIRES: target={{x86_64-.+-linux-gnu}} +// REQUIRES: target-x86_64 // REQUIRES: objcopy-available // TODO: Figure out why this fails with Memory Sanitizer. @@ -21,7 +21,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..c119d1859808f 100644 --- a/libunwind/test/floatregister.pass.cpp +++ b/libunwind/test/floatregister.pass.cpp @@ -7,7 +7,8 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: linux && target={{aarch64-.+}} +// REQUIRES: target-aarch64 +// UNSUPPORTED: system-windows // Basic test for float registers number are accepted. diff --git a/libunwind/test/forceunwind.pass.cpp b/libunwind/test/forceunwind.pass.cpp index 9e032fc680806..54d05ff874388 100644 --- a/libunwind/test/forceunwind.pass.cpp +++ b/libunwind/test/forceunwind.pass.cpp @@ -7,7 +7,8 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: linux +// UNSUPPORTED: system-darwin +// UNSUPPORTED: system-windows // 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..af928f70076ab 100644 --- a/libunwind/test/remember_state_leak.pass.sh.s +++ b/libunwind/test/remember_state_leak.pass.sh.s @@ -6,7 +6,8 @@ # #===------------------------------------------------------------------------===# -# REQUIRES: target={{x86_64-.+-linux-gnu}} +# REQUIRES: target-x86_64 +# UNSUPPORTED: system-windows # 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..202eacbac633c 100644 --- a/libunwind/test/signal_unwind.pass.cpp +++ b/libunwind/test/signal_unwind.pass.cpp @@ -8,7 +8,8 @@ //===----------------------------------------------------------------------===// // 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)-.+}} +// UNSUPPORTED: system-windows // 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..2a8fbd276bafa 100644 --- a/libunwind/test/unwind_leaffunction.pass.cpp +++ b/libunwind/test/unwind_leaffunction.pass.cpp @@ -8,7 +8,8 @@ //===----------------------------------------------------------------------===// // Ensure that leaf function can be unwund. -// REQUIRES: target={{(aarch64|loongarch64|riscv64|s390x|x86_64)-.+linux.*}} +// REQUIRES: target={{(aarch64|loongarch64|riscv64|s390x|x86_64)-.+}} +// UNSUPPORTED: system-windows // 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..458b50f12f698 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
