brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · d3d4966 Raw
56 lines · plain
1## In this test we check that short command line options can be grouped.2 3## Check grouped options produce identical output to when not grouped.4# RUN: yaml2obj %s -o %t.o5# RUN: llvm-readelf -aeWhSrnudlVgIs %t.o > %t.grouped6# RUN: llvm-readelf -a -e -W -h -S -r -n -u -d -l -V -g -I -s %t.o > %t.not-grouped7# RUN: cmp %t.grouped %t.not-grouped8# RUN: FileCheck /dev/null --input-file %t.grouped --implicit-check-not=error:9 10## Check that the output without -a (--all) option is the same. We do it11## to verify that each of the options is handled, and not just the first12## one nor just -a, which triggers all other options.13# RUN: llvm-readelf -eWhSrnudlVgIs %t.o > %t.grouped.no.a14# RUN: cmp %t.grouped %t.grouped.no.a15 16## -e (--headers) is equivalent to setting --file-headers (-h),17## --program-headers (-l) and --section-headers (-S).18## Check that the output without -e is equal to the output with it.19## We do not use -a in this test either.20# RUN: llvm-readelf -WhSrnudlVgIs %t.o > %t.grouped.no.ae21# RUN: cmp %t.grouped %t.grouped.no.ae22 23## An arbitrary YAML description that triggers an output for each of24## the short option from the test sequence.25 26--- !ELF27FileHeader:28  Class:   ELFCLASS6429  Data:    ELFDATA2LSB30  Type:    ET_EXEC31  Machine: EM_X86_6432Sections:33  - Name:    .note.ABI-tag34    Type:    SHT_NOTE35## An arbitrary valid note content.36    Content: 040000001000000001000000474E55000000000002000000060000002000000037  - Name: .eh_frame38    Type: SHT_PROGBITS39  - Name:    .dynamic40    Type:    SHT_DYNAMIC41    Entries:42      - Tag:   DT_NULL43        Value: 044  - Name:    .gnu.version45    Type:    SHT_GNU_versym46    Flags:   [ SHF_ALLOC ]47    Entries: [ 0, 1 ]48DynamicSymbols:49  - Name:    foo50    Binding: STB_GLOBAL51 52## Check llvm-readobj supports grouped short options as well.53# RUN: llvm-readobj -aeWhSsrnudlVgIS %t.o > %t.grouped54# RUN: llvm-readobj -a -e -W -h -S -r -n -u -d -l -V -g -I -s %t.o > %t.not-grouped55# RUN: cmp %t.grouped %t.not-grouped56