-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[libunwind][test] set fed test to require x86 as others arch may have cross toolchain build #156383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-libunwind Author: Wu Yingcong (yingcong-wu) ChangesIn #154902, the test failed with llvm-clang-win-x-aarch64(it pretends to be a Linux build?), and objdump is not available there. Full diff: https://github.com/llvm/llvm-project/pull/156383.diff 1 Files Affected:
diff --git a/libunwind/test/eh_frame_fde_pc_range.pass.cpp b/libunwind/test/eh_frame_fde_pc_range.pass.cpp
index d8bcb3939913c..28f4ae1efed31 100644
--- a/libunwind/test/eh_frame_fde_pc_range.pass.cpp
+++ b/libunwind/test/eh_frame_fde_pc_range.pass.cpp
@@ -19,9 +19,9 @@
// XFAIL: msan
// RUN: %{build}
-// RUN: objcopy --dump-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe
+// RUN: llvm-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: llvm-objcopy --update-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe
// RUN: %{exec} %t.exe
// clang-format on
|
|
Add arm as armv7 also have the cross-toolchain build(https://lab.llvm.org/buildbot/#/builders/38/builds/5190). |
philnik777
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming the CI is happy to get that green again. Though I'm not sure we want to keep the test as-is. It seems to have quite a few assumptions about the environment baked in.
|
I admit that this test is not well-written, but it is also hard to write the test that meet the condition. If we simply does not emit .eh_frame_hdr section, then libunwind simply won't work because it gets the .eh_frame addr from it. And I don't have any clue how to make the linker generate a .eh_frame_hdr that only contains the .eh_frame addr and no search table. I would happily open to any suggestions. |
| // clang-format off | ||
|
|
||
| // REQUIRES: linux | ||
| // REQUIRES: target={{x86_64-.+-linux-gnu}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't we use llvm-objcopy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good suggestion. I will give it a try later.
…mpatibility (#161112) Previously, we only used `objcopy`, which is not available for some build configurations. With this patch, we not only try to use `objcopy`, but also try to use `llvm-objcopy` if available. This is a follow-up of llvm/llvm-project#156383.
…llvm#161112) Previously, we only used `objcopy`, which is not available for some build configurations. With this patch, we not only try to use `objcopy`, but also try to use `llvm-objcopy` if available. This is a follow-up of llvm#156383.
In #154902, the test failed with llvm-clang-win-x-aarch64(it is a cross-build, which builds on Windows and run on Linux, "Win to Aarch64 Linux Ubuntu Cross Toolchain"), and objdump is not available on Windows(the build env).
Set to require x86 Linux instead.