libunwind: Remove OS requirements from tests to make them run on more OSes (#167642)
There might be a cleaner way to enable these tests running on FreeBSD,
I'm open to suggestions.
Co-authored-by: Alexander Richardson <[email protected]>
NOKEYCHECK=True
GitOrigin-RevId: 33bcde0678707ffffb7f01188d530da05bed47b8
diff --git a/test/aarch64_vg_unwind.pass.cpp b/test/aarch64_vg_unwind.pass.cpp
index 1c139a7..d0c623b 100644
--- a/test/aarch64_vg_unwind.pass.cpp
+++ b/test/aarch64_vg_unwind.pass.cpp
@@ -6,7 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: linux && target={{aarch64-.+}}
+// REQUIRES: target={{aarch64-.+}}
+// UNSUPPORTED: target={{.*-windows.*}}
#include <libunwind.h>
#include <stdlib.h>
diff --git a/test/aarch64_za_unwind.pass.cpp b/test/aarch64_za_unwind.pass.cpp
index 2985bb8..9f6b106 100644
--- a/test/aarch64_za_unwind.pass.cpp
+++ b/test/aarch64_za_unwind.pass.cpp
@@ -6,7 +6,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: linux && target={{aarch64-.+}}
+// REQUIRES: target={{aarch64-.+}}
+// UNSUPPORTED: target={{.*-windows.*}}
#include <libunwind.h>
#include <stdint.h>
diff --git a/test/bad_unwind_info.pass.cpp b/test/bad_unwind_info.pass.cpp
index 272a83f..ded0584 100644
--- a/test/bad_unwind_info.pass.cpp
+++ b/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: target={{.*-windows.*}}
// GCC doesn't support __attribute__((naked)) on AArch64.
// UNSUPPORTED: gcc
diff --git a/test/eh_frame_fde_pc_range.pass.cpp b/test/eh_frame_fde_pc_range.pass.cpp
index 795ce66..173983e 100644
--- a/test/eh_frame_fde_pc_range.pass.cpp
+++ b/test/eh_frame_fde_pc_range.pass.cpp
@@ -13,15 +13,16 @@
// clang-format off
-// REQUIRES: target={{x86_64-.+-linux-gnu}}
+// REQUIRES: target={{x86_64-.+}}
// REQUIRES: objcopy-available
+// UNSUPPORTED: target={{.*-windows.*}}
// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan
// 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/test/floatregister.pass.cpp b/test/floatregister.pass.cpp
index 018b792..6be3e1f 100644
--- a/test/floatregister.pass.cpp
+++ b/test/floatregister.pass.cpp
@@ -7,7 +7,8 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: linux && target={{aarch64-.+}}
+// REQUIRES: target={{aarch64-.+}}
+// UNSUPPORTED: target={{.*-windows.*}}
// Basic test for float registers number are accepted.
diff --git a/test/forceunwind.pass.cpp b/test/forceunwind.pass.cpp
index 9e032fc..e5437c3 100644
--- a/test/forceunwind.pass.cpp
+++ b/test/forceunwind.pass.cpp
@@ -7,7 +7,9 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: linux
+// UNSUPPORTED: target={{.*-apple.*}}
+// UNSUPPORTED: target={{.*-aix.*}}
+// UNSUPPORTED: target={{.*-windows.*}}
// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan
diff --git a/test/remember_state_leak.pass.sh.s b/test/remember_state_leak.pass.sh.s
index d3335cf..338a8f9 100644
--- a/test/remember_state_leak.pass.sh.s
+++ b/test/remember_state_leak.pass.sh.s
@@ -6,7 +6,8 @@
#
#===------------------------------------------------------------------------===#
-# REQUIRES: target={{x86_64-.+-linux-gnu}}
+# REQUIRES: target={{x86_64-.+}}
+# UNSUPPORTED: target={{.*-windows.*}}
# Inline assembly isn't supported by Memory Sanitizer
# UNSUPPORTED: msan
diff --git a/test/signal_unwind.pass.cpp b/test/signal_unwind.pass.cpp
index 4de271e..dbabe49 100644
--- a/test/signal_unwind.pass.cpp
+++ b/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: target={{.*-windows.*}}
// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan
diff --git a/test/unwind_leaffunction.pass.cpp b/test/unwind_leaffunction.pass.cpp
index d336c15..f781d7b 100644
--- a/test/unwind_leaffunction.pass.cpp
+++ b/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: target={{.*-windows.*}}
// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan
diff --git a/test/unwind_scalable_vectors.pass.cpp b/test/unwind_scalable_vectors.pass.cpp
index 57ef4d7..38d8bd5 100644
--- a/test/unwind_scalable_vectors.pass.cpp
+++ b/test/unwind_scalable_vectors.pass.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-// REQUIRES: linux && target={{riscv64-.+}}
+// REQUIRES: target={{riscv64-.+}}
#undef NDEBUG
#include <assert.h>