Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions libunwind/test/configs/cmake-bridge.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import os, site
site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
import libcxx.test.format
from lit.util import which

# Basic configuration of the test suite
config.name = os.path.basename('@LIBUNWIND_TEST_CONFIG@')
Expand All @@ -33,3 +34,13 @@ config.substitutions.append(('%{install-prefix}', '@LIBUNWIND_TESTING_INSTALL_PR
config.substitutions.append(('%{include}', '@LIBUNWIND_TESTING_INSTALL_PREFIX@/include'))
config.substitutions.append(('%{lib}', '@LIBUNWIND_TESTING_INSTALL_PREFIX@/@LIBUNWIND_INSTALL_LIBRARY_DIR@'))
config.substitutions.append(('%{benchmark_flags}', ''))

# Check for objcopy tools
objcopy_path = which('llvm-objcopy', '@LLVM_BUILD_BINARY_DIR@/bin')
if not objcopy_path:
objcopy_path = which('llvm-objcopy')
if not objcopy_path:
objcopy_path = which('objcopy')
if objcopy_path:
config.substitutions.append(('%{objcopy}', objcopy_path))
config.available_features.add('objcopy-available')
9 changes: 4 additions & 5 deletions libunwind/test/eh_frame_fde_pc_range.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@

// clang-format off

// REQUIRES: target={{x86_64-.+-linux-gnu}}
// aarch64,arm have a cross toolchain build(llvm-clang-win-x-aarch64, etc)
// where objdump is not available.
// REQUIRES: linux, objcopy-available
// UNSUPPORTED: target={{.+-gnueabi.*}}

// 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: %{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: objcopy --update-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe
// RUN: %{objcopy} --update-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe
// RUN: %{exec} %t.exe

// clang-format on
Expand Down
Loading