From 1f8e20e214f584ffce7f2221933e34b5734eb715 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Thu, 7 Sep 2023 15:13:47 -0700 Subject: [PATCH] [BOLT][test] Fix patch-entries for aarch64 buildbot --- bolt/test/X86/Inputs/patch-entries.c | 8 ++++++++ bolt/test/X86/patch-entries.c | 19 ------------------- bolt/test/X86/patch-entries.test | 10 ++++++++++ 3 files changed, 18 insertions(+), 19 deletions(-) create mode 100644 bolt/test/X86/Inputs/patch-entries.c delete mode 100644 bolt/test/X86/patch-entries.c create mode 100644 bolt/test/X86/patch-entries.test diff --git a/bolt/test/X86/Inputs/patch-entries.c b/bolt/test/X86/Inputs/patch-entries.c new file mode 100644 index 0000000000000..46a3b41b048e4 --- /dev/null +++ b/bolt/test/X86/Inputs/patch-entries.c @@ -0,0 +1,8 @@ +#include "stub.h" + +static void foo() { printf("foo\n"); } + +int main() { + foo(); + return 0; +} diff --git a/bolt/test/X86/patch-entries.c b/bolt/test/X86/patch-entries.c deleted file mode 100644 index d435781fc60f0..0000000000000 --- a/bolt/test/X86/patch-entries.c +++ /dev/null @@ -1,19 +0,0 @@ -// Checking crashes against injected binary functions created by patch -// entries pass and debug info turned on. In these cases, we were -// trying to fetch input to output maps on injected functions and -// crashing. - -// REQUIRES: system-linux - -// RUN: %clang %cflags -no-pie -g %s -fuse-ld=lld -o %t.exe -Wl,-q -// RUN: llvm-bolt -relocs %t.exe -o %t.out --update-debug-sections \ -// RUN: --force-patch - -#include - -static void foo() { printf("foo\n"); } - -int main() { - foo(); - return 0; -} diff --git a/bolt/test/X86/patch-entries.test b/bolt/test/X86/patch-entries.test new file mode 100644 index 0000000000000..54f358f273e79 --- /dev/null +++ b/bolt/test/X86/patch-entries.test @@ -0,0 +1,10 @@ +# Checking crashes against injected binary functions created by patch +# entries pass and debug info turned on. In these cases, we were +# trying to fetch input to output maps on injected functions and +# crashing. + +REQUIRES: system-linux + +RUN: %clang %cflags -no-pie -g %p/Inputs/patch-entries.c -fuse-ld=lld -o %t.exe \ +RUN: -Wl,-q -I%p/../Inputs +RUN: llvm-bolt -relocs %t.exe -o %t.out --update-debug-sections --force-patch