summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-08-21 11:19:50 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-08-21 11:19:50 +0000
commita50f115d3673c73cd64e388ab3d2151c7f6e396f (patch)
tree9559a1f80a8355584dfe6b91e7382b00c741e7a6
parentf0f38d9b9deea950659756ddd490c6673199e4aa (diff)
downloadbcm5719-llvm-a50f115d3673c73cd64e388ab3d2151c7f6e396f.tar.gz
bcm5719-llvm-a50f115d3673c73cd64e388ab3d2151c7f6e396f.zip
[LLD][ELF] - Simplify the bad-archive.s test case.
This removes the precompiled binary and improves the check of the error reported. Differential revision: https://reviews.llvm.org/D66523 llvm-svn: 369516
-rw-r--r--lld/test/ELF/Inputs/bad-archive.a2
-rw-r--r--lld/test/ELF/bad-archive.s9
2 files changed, 6 insertions, 5 deletions
diff --git a/lld/test/ELF/Inputs/bad-archive.a b/lld/test/ELF/Inputs/bad-archive.a
deleted file mode 100644
index c9c6fbfd914..00000000000
--- a/lld/test/ELF/Inputs/bad-archive.a
+++ /dev/null
@@ -1,2 +0,0 @@
-!<arch>
-this is malformed archive used in bad-archive.s
diff --git a/lld/test/ELF/bad-archive.s b/lld/test/ELF/bad-archive.s
index 39c8e160f95..6d70e554267 100644
--- a/lld/test/ELF/bad-archive.s
+++ b/lld/test/ELF/bad-archive.s
@@ -2,10 +2,13 @@
// Check bad archive error reporting with --whole-archive
// and without it.
+
+// RUN: echo "!<arch>" > %t.a
+// RUN: echo "foo" >> %t.a
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-// RUN: not ld.lld %t.o %p/Inputs/bad-archive.a -o %t 2>&1 | FileCheck %s
-// RUN: not ld.lld %t.o --whole-archive %p/Inputs/bad-archive.a -o %t 2>&1 | FileCheck %s
-// CHECK: bad-archive.a: failed to parse archive
+// RUN: not ld.lld %t.o %t.a -o %t 2>&1 | FileCheck -DFILE=%t.a %s
+// RUN: not ld.lld %t.o --whole-archive %t.a -o %t 2>&1 | FileCheck -DFILE=%t.a %s
+// CHECK: error: [[FILE]]: failed to parse archive: truncated or malformed archive (remaining size of archive too small for next archive member header at offset 8)
.globl _start
_start:
OpenPOWER on IntegriCloud