xref: /llvm-project/llvm/test/tools/llvm-dwp/X86/compressfail.test (revision 141c9d775961576809f15e83e19a5cd1482f330b)
1# REQUIRES: zlib
2# RUN: yaml2obj --docnum=1 %s -o %t1.o
3# RUN: not llvm-dwp %t1.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR1
4# RUN: yaml2obj --docnum=2 %s -o %t2.o
5# RUN: not llvm-dwp %t2.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2
6
7# ERR1: error: failure while decompressing compressed section: '.debug_info.dwo', corrupted compressed section header
8# ERR2: error: failure while decompressing compressed section: '.debug_info.dwo', zlib error: Z_DATA_ERROR
9
10--- !ELF
11FileHeader:
12  Class:   ELFCLASS64
13  Data:    ELFDATA2LSB
14  Type:    ET_REL
15  Machine: EM_X86_64
16Sections:
17  - Name:         .debug_info.dwo
18    Type:         SHT_PROGBITS
19    Flags:        [ SHF_COMPRESSED ]
20    AddressAlign: 8
21
22--- !ELF
23FileHeader:
24  Class:   ELFCLASS64
25  Data:    ELFDATA2LSB
26  Type:    ET_REL
27  Machine: EM_X86_64
28Sections:
29  - Name:         .debug_info.dwo
30    Type:         SHT_PROGBITS
31    Flags:        [ SHF_COMPRESSED ]
32    AddressAlign: 8
33    Content:      "010000000000000004000000000000000100000000000000ffff"
34