summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/corrupt.test
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-11-16 05:10:28 +0000
committerDavide Italiano <davide@freebsd.org>2016-11-16 05:10:28 +0000
commit6cf09265f9087b5d285d3eec6ee31b49bcce0c9f (patch)
treeb5d5ba3a43360d5cf9de131aea2155f8a84bb0e5 /llvm/test/Object/corrupt.test
parent86dd66e96cc57d70639bfbae71f23ad4953ea1a5 (diff)
downloadbcm5719-llvm-6cf09265f9087b5d285d3eec6ee31b49bcce0c9f.tar.gz
bcm5719-llvm-6cf09265f9087b5d285d3eec6ee31b49bcce0c9f.zip
[ELF] Convert ELF.h to Expected<T>.
This has two advantages: 1) We slowly move away from ErrorOr to the new handling interface, in the hope of having an uniform error handling in LLVM, eventually. 2) We're starting to have *meaningful* error messages for invalid object ELF files, rather than a generic "parse error". At some point we should include also the offset to improve the quality of the diagnostic. llvm-svn: 287081
Diffstat (limited to 'llvm/test/Object/corrupt.test')
-rw-r--r--llvm/test/Object/corrupt.test8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Object/corrupt.test b/llvm/test/Object/corrupt.test
index d19d2924f14..9cbe9ef5e08 100644
--- a/llvm/test/Object/corrupt.test
+++ b/llvm/test/Object/corrupt.test
@@ -2,21 +2,21 @@
RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -sections \
RUN: 2>&1 | FileCheck --check-prefix=SECNAME %s
-SECNAME: Error reading file: Invalid data was encountered while parsing the file.
+SECNAME: invalid string offset
// Section data offset past end of file.
RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -sections -section-data \
RUN: 2>&1 | FileCheck --check-prefix=SECDATA %s
-SECDATA: Error reading file: Invalid data was encountered while parsing the file.
+SECDATA: invalid section offset
// Symbol name offset overflows string table.
RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -symbols \
RUN: 2>&1 | FileCheck --check-prefix=SYMNAME %s
-SYMNAME: Error reading file: Invalid data was encountered while parsing the file.
+SYMNAME: invalid string offset
// Version index in .gnu.version overflows the version map.
@@ -36,7 +36,7 @@ RUN: not llvm-readobj -program-headers \
RUN: %p/Inputs/corrupt-invalid-phentsize.elf.x86-64 2>&1 | \
RUN: FileCheck --check-prefix=PHENTSIZE %s
-PHENTSIZE: Invalid data was encountered while parsing the file.
+PHENTSIZE: invalid e_phentsize
RUN: not llvm-readobj -dynamic-table \
RUN: %p/Inputs/corrupt-invalid-virtual-addr.elf.x86-64 2>&1 | \
OpenPOWER on IntegriCloud