[BOLT][TEST] Split runtime tests into test/runtime folder
authorAmir Ayupov <aaupov@fb.com>
Thu, 23 Sep 2021 00:58:33 +0000 (17:58 -0700)
committerMaksim Panchenko <maks@fb.com>
Thu, 23 Sep 2021 00:58:33 +0000 (17:58 -0700)
Summary:
Create bolt/test/runtime folder and move tests that execute the binary.
Move lit.local.cfg with host_arch check to the corresponding folder.
Addresses issue facebookincubator/BOLT#132.

AArch64/tls.c shows a different behavior with clang hence marked as XFAIL

TODO: add a check for non-exec tests for a corresponding LLVM_TARGETS_TO_BUILD.

(cherry picked from FBD31132234)

24 files changed:
bolt/test/AArch64/tls.c
bolt/test/runtime/AArch64/adrrelaxationpass.s [moved from bolt/test/AArch64/adrrelaxationpass.s with 100% similarity]
bolt/test/runtime/AArch64/issue177.s [moved from bolt/test/AArch64/issue177.s with 100% similarity]
bolt/test/runtime/AArch64/lit.local.cfg [moved from bolt/test/AArch64/lit.local.cfg with 100% similarity]
bolt/test/runtime/X86/Inputs/fdata-escape-chars-syms.txt [moved from bolt/test/X86/Inputs/fdata-escape-chars-syms.txt with 100% similarity]
bolt/test/runtime/X86/Inputs/fdata-escape-chars.txt [moved from bolt/test/X86/Inputs/fdata-escape-chars.txt with 100% similarity]
bolt/test/runtime/X86/Inputs/user_func_order.txt [moved from bolt/test/X86/Inputs/user_func_order.txt with 100% similarity]
bolt/test/runtime/X86/fdata-escape-chars.ll [moved from bolt/test/X86/fdata-escape-chars.ll with 100% similarity]
bolt/test/runtime/X86/fix-branches-jrcxz.s [moved from bolt/test/X86/fix-branches-jrcxz.s with 100% similarity]
bolt/test/runtime/X86/hot_end_symbol.s [moved from bolt/test/X86/hot_end_symbol.s with 100% similarity]
bolt/test/runtime/X86/instrumentation-dup-jts.s [moved from bolt/test/X86/instrumentation-dup-jts.s with 100% similarity]
bolt/test/runtime/X86/instrumentation-ind-calls.s [moved from bolt/test/X86/instrumentation-ind-calls.s with 100% similarity]
bolt/test/runtime/X86/instrumentation-indirect.c [moved from bolt/test/X86/instrumentation-indirect.c with 100% similarity]
bolt/test/runtime/X86/instrumentation-pie.c [moved from bolt/test/X86/instrumentation-pie.c with 100% similarity]
bolt/test/runtime/X86/instrumentation-shlib.c [moved from bolt/test/X86/instrumentation-shlib.c with 100% similarity]
bolt/test/runtime/X86/interp-overwrite-bug.s [moved from bolt/test/X86/interp-overwrite-bug.s with 100% similarity]
bolt/test/runtime/X86/lit.local.cfg [moved from bolt/test/X86/lit.local.cfg with 100% similarity]
bolt/test/runtime/X86/section_reloc_with_addend.s [moved from bolt/test/X86/section_reloc_with_addend.s with 100% similarity]
bolt/test/runtime/X86/shrinkwrapping-alignment.s [moved from bolt/test/X86/shrinkwrapping-alignment.s with 100% similarity]
bolt/test/runtime/X86/shrinkwrapping-lock.s [moved from bolt/test/X86/shrinkwrapping-lock.s with 100% similarity]
bolt/test/runtime/X86/shrinkwrapping-pushpop.s [moved from bolt/test/X86/shrinkwrapping-pushpop.s with 100% similarity]
bolt/test/runtime/X86/tail-duplication-constant-prop.s [moved from bolt/test/X86/tail-duplication-constant-prop.s with 100% similarity]
bolt/test/runtime/X86/three-way-branch-pass.s [moved from bolt/test/X86/three-way-branch-pass.s with 100% similarity]
bolt/test/runtime/X86/user-func-reorder.c [moved from bolt/test/X86/user-func-reorder.c with 100% similarity]

index f7ba851..816b473 100644 (file)
@@ -24,10 +24,14 @@ int main() {
 }
 
 // REQUIRES: system-linux
-
+// XFAIL: *
 // RUN: %clang %cflags -no-pie %s -o %t.exe -Wl,-q \
-// RUN:   -Wl,--unresolved-symbols=ignore-all
+// RUN:   -Wl,--unresolved-symbols=ignore-all \
+// RUN:   -target aarch64-linux -fuse-ld=ld.lld \
+// RUN:   -nostdlib
 // RUN: llvm-bolt %t.exe -o %t.bolt
-// RUN: %clang %cflags -fPIC -pie -%s -o %t_pie.exe -Wl,-q \
-// RUN:   -Wl,--unresolved-symbols=ignore-all
+// RUN: %clang %cflags -fPIC -pie %s -o %t_pie.exe -Wl,-q \
+// RUN:   -Wl,--unresolved-symbols=ignore-all \
+// RUN:   -target aarch64-linux -fuse-ld=ld.lld \
+// RUN:   -nostdlib
 // RUN: llvm-bolt %t_pie.exe -o %t.bolt