summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/invalid.test
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-05-10 14:18:11 +0000
committerSam Clegg <sbc@chromium.org>2017-05-10 14:18:11 +0000
commitc0d76649d4c7b18527a6626d83e8400bbc5fe818 (patch)
treec8aac38757e4d4ab080abb9ee9633cfac7f7dca7 /llvm/test/Object/invalid.test
parent1546d319244c23c7ad91d2c1113568d314f66088 (diff)
downloadbcm5719-llvm-c0d76649d4c7b18527a6626d83e8400bbc5fe818.tar.gz
bcm5719-llvm-c0d76649d4c7b18527a6626d83e8400bbc5fe818.zip
[llvm-readobj] Improve errors on invalid binary
The previous code was discarding the error message from createBinary() by calling errorToErrorCode(). This meant that such error were always reported unhelpfully as "Invalid data was encountered while parsing the file". Other tools such as llvm-objdump already produce a more the error message in this case. Differential Revision: https://reviews.llvm.org/D32985 llvm-svn: 302664
Diffstat (limited to 'llvm/test/Object/invalid.test')
-rw-r--r--llvm/test/Object/invalid.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test
index fc1a77b2c0c..dcbac32f719 100644
--- a/llvm/test/Object/invalid.test
+++ b/llvm/test/Object/invalid.test
@@ -53,7 +53,7 @@ INVALID-SYMTAB-SIZE: size is not a multiple of sh_entsize
RUN: not llvm-readobj -t %p/Inputs/invalid-xindex-size.elf 2>&1 | FileCheck --check-prefix=INVALID-XINDEX-SIZE %s
-INVALID-XINDEX-SIZE: Invalid data was encountered while parsing the file.
+INVALID-XINDEX-SIZE: Invalid data was encountered while parsing the file
RUN: not llvm-readobj -t %p/Inputs/invalid-e_shnum.elf 2>&1 | FileCheck --check-prefix=INVALID-SH-NUM %s
INVALID-SH-NUM: invalid e_phentsize
@@ -77,7 +77,7 @@ RUN: FileCheck --check-prefix=INVALID-SECTION-SIZE2 %s
INVALID-SECTION-SIZE2: invalid section offset
RUN: not llvm-readobj -t %p/Inputs/invalid-sections-num.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-NUM %s
-INVALID-SECTION-NUM: Invalid data was encountered while parsing the file.
+INVALID-SECTION-NUM: Invalid data was encountered while parsing the file
RUN: not llvm-readobj -r %p/Inputs/invalid-rel-sym.elf 2>&1 | FileCheck --check-prefix=INVALID-REL-SYM %s
INVALID-REL-SYM: invalid section offset
OpenPOWER on IntegriCloud