[lld] db367ff - [LLD][PowerPC][test] Fix out-of-memory issue running ppc64-pcrel-long-branch-error.s
Victor Huang via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 07:09:35 PDT 2020
Author: Victor Huang
Date: 2020-09-03T09:08:24-05:00
New Revision: db367ff2d8d038f61d09521d5e6a293528df3d54
URL: https://github.com/llvm/llvm-project/commit/db367ff2d8d038f61d09521d5e6a293528df3d54
DIFF: https://github.com/llvm/llvm-project/commit/db367ff2d8d038f61d09521d5e6a293528df3d54.diff
LOG: [LLD][PowerPC][test] Fix out-of-memory issue running ppc64-pcrel-long-branch-error.s
Following 97febb1, fix the out-of-memory error associated with buffering the output
in-memory by writing to an allocated file with the minimum offset and running it
on ppc system-linux only.
Peer reviewed by: nemanjai
Added:
Modified:
lld/test/ELF/ppc64-pcrel-long-branch-error.s
Removed:
################################################################################
diff --git a/lld/test/ELF/ppc64-pcrel-long-branch-error.s b/lld/test/ELF/ppc64-pcrel-long-branch-error.s
index b9904909742d..2db9d15b70d0 100644
--- a/lld/test/ELF/ppc64-pcrel-long-branch-error.s
+++ b/lld/test/ELF/ppc64-pcrel-long-branch-error.s
@@ -1,22 +1,23 @@
-## The test as-is needs a large heap size.
-## Disabled until we know how to check for that prerequisite.
-# UNSUPPORTED: ppc
-
-# REQUIRES: ppc
+# REQUIRES: ppc, system-linux
# RUN: echo 'SECTIONS { \
# RUN: .text_low 0x2000: { *(.text_low) } \
-# RUN: .text_high 0x800002000 : { *(.text_high) } \
+# RUN: .text_high 0x200002010 : { *(.text_high) } \
# RUN: }' > %t.script
+## In this test, we do not use -o /dev/null like other similar cases do since
+## it will fail in some enviroments with out-of-memory errors associated with
+## buffering the output in memeory. The test is enabled for ppc linux only since
+## writing to an allocated file will cause time out error for this case on freebsd.
+
# RUN: llvm-mc -filetype=obj -triple=ppc64le %s -o %t.o
-# RUN: not ld.lld -T %t.script %t.o -o /dev/null 2>&1 | FileCheck %s
+# RUN: not ld.lld -T %t.script %t.o -o %t 2>&1 | FileCheck %s
# RUN: llvm-mc -filetype=obj -triple=ppc64le -defsym HIDDEN=1 %s -o %t.o
-# RUN: not ld.lld -shared -T %t.script %t.o -o /dev/null 2>&1 | FileCheck %s
+# RUN: not ld.lld -shared -T %t.script %t.o -o %t 2>&1 | FileCheck %s
# RUN: llvm-mc -filetype=obj -triple=ppc64 %s -o %t.o
-# RUN: not ld.lld -T %t.script %t.o -o /dev/null 2>&1 | FileCheck %s
+# RUN: not ld.lld -T %t.script %t.o -o %t 2>&1 | FileCheck %s
# RUN: llvm-mc -filetype=obj -triple=ppc64 -defsym HIDDEN=1 %s -o %t.o
-# RUN: not ld.lld -shared -T %t.script %t.o -o /dev/null 2>&1 | FileCheck %s
+# RUN: not ld.lld -shared -T %t.script %t.o -o %t 2>&1 | FileCheck %s
# CHECK: error: offset overflow 34 bits, please compile using the large code model
More information about the llvm-commits
mailing list