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 <mail@alexrichardson.me>
This commit is contained in:
Gleb Popov 2025-12-01 23:05:37 +03:00 committed by GitHub
parent df3e1b59d8
commit 33bcde0678
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 21 additions and 11 deletions

View File

@ -6,7 +6,8 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: linux && target={{aarch64-.+}}
// REQUIRES: target={{aarch64-.+}}
// UNSUPPORTED: target={{.*-windows.*}}
#include <libunwind.h>
#include <stdlib.h>

View File

@ -6,7 +6,8 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: linux && target={{aarch64-.+}}
// REQUIRES: target={{aarch64-.+}}
// UNSUPPORTED: target={{.*-windows.*}}
#include <libunwind.h>
#include <stdint.h>

View File

@ -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

View File

@ -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

View File

@ -7,7 +7,8 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: linux && target={{aarch64-.+}}
// REQUIRES: target={{aarch64-.+}}
// UNSUPPORTED: target={{.*-windows.*}}
// Basic test for float registers number are accepted.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: linux && target={{riscv64-.+}}
// REQUIRES: target={{riscv64-.+}}
#undef NDEBUG
#include <assert.h>