Skip to content

Commit 2ecfb53

Browse files
committed
add warnning test scenario
1 parent dce5109 commit 2ecfb53

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/test/tools/llvm-objdump/XCOFF/private-headers-option.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
# RUN: llvm-objdump --private-headers %t_xcoff64.o |\
88
# RUN: FileCheck %s --check-prefixes=CHECK64 --match-full-lines
99

10+
# RUN: yaml2obj --docnum=1 %s -o %t-truncate.o
11+
# RUN: %python -c "with open('%/t-truncate.o', 'r+b') as input: input.truncate(60)"
12+
# RUN: llvm-objdump --private-headers %t-truncate.o 2>&1 |\
13+
# RUN: FileCheck --check-prefix=WARN %s
14+
15+
# WARN: The end of the file was unexpectedly encountered: loader section with offset 0x3c and size 0x20 goes past the end of the file
16+
1017
--- !XCOFF
1118
FileHeader:
1219
MagicNumber: 0x1DF

0 commit comments

Comments
 (0)