Skip to content

Commit 087dad9

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 087dad9

10 files changed

+9
-12
lines changed

libunwind/test/aarch64_vg_unwind.pass.cpp

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

9-
// REQUIRES: linux && target={{aarch64-.+}}
9+
// REQUIRES: target={{aarch64-.+}}
1010

1111
#include <libunwind.h>
1212
#include <stdlib.h>

libunwind/test/aarch64_za_unwind.pass.cpp

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

9-
// REQUIRES: linux && target={{aarch64-.+}}
9+
// REQUIRES: target={{aarch64-.+}}
1010

1111
#include <libunwind.h>
1212
#include <stdint.h>

libunwind/test/bad_unwind_info.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
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)-.+}}
1414

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

libunwind/test/eh_frame_fde_pc_range.pass.cpp

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

1414
// clang-format off
1515

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

1918
// TODO: Figure out why this fails with Memory Sanitizer.
2019
// XFAIL: msan
2120

2221
// RUN: %{build}
2322
// 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
23+
// RUN: printf '\377' | dd of=%t_ehf_hdr.bin bs=1 seek=2 count=2 conv=notrunc status=none
2524
// RUN: %{objcopy} --update-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe
2625
// RUN: %{exec} %t.exe
2726

libunwind/test/floatregister.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={{aarch64-.+}}
10+
// REQUIRES: target={{aarch64-.+}}
1111

1212
// Basic test for float registers number are accepted.
1313

libunwind/test/forceunwind.pass.cpp

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

10-
// REQUIRES: linux
11-
1210
// TODO: Figure out why this fails with Memory Sanitizer.
1311
// XFAIL: msan
1412

libunwind/test/remember_state_leak.pass.sh.s

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

9-
# REQUIRES: target={{x86_64-.+-linux-gnu}}
9+
# REQUIRES: target={{x86_64-.+}}
1010

1111
# Inline assembly isn't supported by Memory Sanitizer
1212
# UNSUPPORTED: msan

libunwind/test/signal_unwind.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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)-.+}}
1212

1313
// TODO: Figure out why this fails with Memory Sanitizer.
1414
// XFAIL: msan

libunwind/test/unwind_leaffunction.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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)-.+}}
1212

1313
// TODO: Figure out why this fails with Memory Sanitizer.
1414
// 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)