Skip to content

Commit 936acb2

Browse files
committed
libunwind: Remove OS requirements from tests to make them run on more OSes
While at it, replace "echo -ne" with "printf" for more compatibility.
1 parent ae2b303 commit 936acb2

10 files changed

+19
-11
lines changed

libunwind/test/aarch64_vg_unwind.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// REQUIRES: linux && target={{aarch64-.+}}
9+
// REQUIRES: target-aarch64
10+
// UNSUPPORTED: target={{.*-w64-windows-gnu}}
1011

1112
#include <libunwind.h>
1213
#include <stdlib.h>

libunwind/test/aarch64_za_unwind.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// REQUIRES: linux && target={{aarch64-.+}}
9+
// REQUIRES: target-aarch64
10+
// UNSUPPORTED: target={{.*-w64-windows-gnu}}
1011

1112
#include <libunwind.h>
1213
#include <stdint.h>

libunwind/test/bad_unwind_info.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
// Ensure that libunwind doesn't crash on invalid info; the Linux aarch64
1111
// sigreturn frame check would previously attempt to access invalid memory in
1212
// this scenario.
13-
// REQUIRES: target={{(aarch64|s390x|x86_64)-.+linux.*}}
13+
// REQUIRES: target={{(aarch64|s390x|x86_64)-.+}}
14+
// UNSUPPORTED: target={{.*-w64-windows-gnu}}
1415

1516
// GCC doesn't support __attribute__((naked)) on AArch64.
1617
// UNSUPPORTED: gcc

libunwind/test/eh_frame_fde_pc_range.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313

1414
// clang-format off
1515

16-
// REQUIRES: target={{x86_64-.+-linux-gnu}}
16+
// REQUIRES: target-x86_64
1717
// REQUIRES: objcopy-available
1818

1919
// TODO: Figure out why this fails with Memory Sanitizer.
2020
// XFAIL: msan
2121

2222
// RUN: %{build}
2323
// RUN: %{objcopy} --dump-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe
24-
// RUN: echo -ne '\xFF' | dd of=%t_ehf_hdr.bin bs=1 seek=2 count=2 conv=notrunc status=none
24+
// RUN: printf '\377' | dd of=%t_ehf_hdr.bin bs=1 seek=2 count=2 conv=notrunc status=none
2525
// RUN: %{objcopy} --update-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe
2626
// RUN: %{exec} %t.exe
2727

libunwind/test/floatregister.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
//
88
//===----------------------------------------------------------------------===//
99

10-
// REQUIRES: linux && target={{aarch64-.+}}
10+
// REQUIRES: target-aarch64
11+
// UNSUPPORTED: target={{.*-w64-windows-gnu}}
1112

1213
// Basic test for float registers number are accepted.
1314

libunwind/test/forceunwind.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
//
88
//===----------------------------------------------------------------------===//
99

10-
// REQUIRES: linux
10+
// UNSUPPORTED: system-darwin
11+
// UNSUPPORTED: target={{.*-w64-windows-gnu}}
1112

1213
// TODO: Figure out why this fails with Memory Sanitizer.
1314
// XFAIL: msan

libunwind/test/remember_state_leak.pass.sh.s

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
#
77
#===------------------------------------------------------------------------===#
88

9-
# REQUIRES: target={{x86_64-.+-linux-gnu}}
9+
# REQUIRES: target-x86_64
10+
# UNSUPPORTED: target={{.*-w64-windows-gnu}}
1011

1112
# Inline assembly isn't supported by Memory Sanitizer
1213
# UNSUPPORTED: msan

libunwind/test/signal_unwind.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
//===----------------------------------------------------------------------===//
99

1010
// Ensure that the unwinder can cope with the signal handler.
11-
// REQUIRES: target={{(aarch64|loongarch64|riscv64|s390x|x86_64)-.+linux.*}}
11+
// REQUIRES: target={{(aarch64|loongarch64|riscv64|s390x|x86_64)-.+}}
12+
// UNSUPPORTED: target={{.*-w64-windows-gnu}}
1213

1314
// TODO: Figure out why this fails with Memory Sanitizer.
1415
// XFAIL: msan

libunwind/test/unwind_leaffunction.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
//===----------------------------------------------------------------------===//
99

1010
// Ensure that leaf function can be unwund.
11-
// REQUIRES: target={{(aarch64|loongarch64|riscv64|s390x|x86_64)-.+linux.*}}
11+
// REQUIRES: target={{(aarch64|loongarch64|riscv64|s390x|x86_64)-.+}}
12+
// UNSUPPORTED: target={{.*-w64-windows-gnu}}
1213

1314
// TODO: Figure out why this fails with Memory Sanitizer.
1415
// XFAIL: msan

libunwind/test/unwind_scalable_vectors.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88
//===----------------------------------------------------------------------===//
99

10-
// REQUIRES: linux && target={{riscv64-.+}}
10+
// REQUIRES: target-riscv64
1111

1212
#undef NDEBUG
1313
#include <assert.h>

0 commit comments

Comments
 (0)