summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test')
-rw-r--r--llvm/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test b/llvm/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test
index 7eecde6b0ab..9ebfc11e3c7 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test
@@ -11,11 +11,13 @@
## Truncate the file to end before the section header table ends.
# RUN: %python -c "with open('%/t.o', 'r+b') as input: input.truncate(65)"
-# RUN: not llvm-objcopy %t.o 2>&1 | FileCheck %s -DINPUT=%t.o
+# RUN: not llvm-objcopy %t.o 2>&1 | FileCheck %s -DINPUT=%t.o --check-prefix=CASE1
+
+# CASE1: error: '[[INPUT]]': section header table goes past the end of the file: e_shoff = 0x40
## Set the e_shoff field to a value much larger than the object file size.
# RUN: %python -c "with open('%/t2.o', 'r+b') as input: import struct; bytes = struct.pack('<Q', 0x40000000); input.seek(40); input.write(bytes)"
-# RUN: not llvm-objcopy %t2.o 2>&1 | FileCheck %s -DINPUT=%t2.o
+# RUN: not llvm-objcopy %t2.o 2>&1 | FileCheck %s -DINPUT=%t2.o --check-prefix=CASE2
--- !ELF
FileHeader:
@@ -27,4 +29,4 @@ Sections:
- Name: .foo
Type: SHT_PROGBITS
-# CHECK: error: '[[INPUT]]': section header table goes past the end of the file
+# CASE2: error: '[[INPUT]]': section header table goes past the end of the file: e_shoff = 0x40000000
OpenPOWER on IntegriCloud