Skip to content

Commit

Permalink
[test][llvm-dwarfdump] Use --implicit-check-not to simplify test checks
Browse files Browse the repository at this point in the history
This removes the need to duplicate the LASTONLY check pattern and the
last part of the NONFATAL pattern in the modified test.

Reviewed By: MaskRay, JDevlieghere

Differential Revision: https://reviews.llvm.org/D71757
  • Loading branch information
jh7370 committed Jan 3, 2020
1 parent f6f0cb4 commit 7b4badf
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
Expand Up @@ -24,10 +24,10 @@
## Show that non-fatal errors do not prevent parsing the rest of the section.
# RUN: llvm-mc -triple x86_64-pc-linux %S/Inputs/debug_line_malformed.s -filetype=obj -o %t-malformed.o
# RUN: llvm-dwarfdump -debug-line %t-malformed.o 2> %t-malformed.err \
# RUN: | FileCheck %s --check-prefixes=FIRST,NONFATAL
# RUN: | FileCheck %s --check-prefixes=FIRST,NONFATAL,LAST --implicit-check-not='debug_line[{{.*}}]'
# RUN: FileCheck %s --input-file=%t-malformed.err --check-prefixes=ALL,OTHER
# RUN: llvm-dwarfdump -debug-line %t-malformed.o -verbose 2> %t-malformed-verbose.err \
# RUN: | FileCheck %s --check-prefixes=FIRST,NONFATAL
# RUN: | FileCheck %s --check-prefixes=FIRST,NONFATAL,LAST --implicit-check-not='debug_line[{{.*}}]'
# RUN: FileCheck %s --input-file=%t-malformed-verbose.err --check-prefixes=ALL,OTHER

## We should still produce warnings for malformed tables after the specified unit.
Expand All @@ -37,7 +37,7 @@

## Don't stop looking for the later unit if non-fatal issues are found.
# RUN: llvm-dwarfdump -debug-line=0x2af %t-malformed.o 2> %t-malformed-off-last.err \
# RUN: | FileCheck %s --check-prefixes=LASTONLY
# RUN: | FileCheck %s --check-prefix=LAST --implicit-check-not='debug_line[{{.*}}]'
# RUN: FileCheck %s --input-file=%t-malformed-off-last.err --check-prefix=ALL

# FIRST: debug_line[0x00000000]
Expand Down Expand Up @@ -136,14 +136,8 @@
# NONFATAL-NEXT: Line table prologue
# NONFATAL-NOT: Address

# NONFATAL: debug_line[0x000002af]
# NONFATAL-NOT: debug_line[{{.*}}]
# NONFATAL: 0x00000000cafebabe {{.*}} end_sequence
# NONFATAL-NOT: debug_line[{{.*}}]

# LASTONLY-NOT: debug_line[{{.*}}]
# LASTONLY: debug_line[0x000002af]
# LASTONLY: 0x00000000cafebabe {{.*}} end_sequence
# LAST: debug_line[0x000002af]
# LAST: 0x00000000cafebabe {{.*}} end_sequence

# RESERVED: warning: parsing line table prologue at offset 0x00000048 unsupported reserved unit length found of value 0xfffffffe

Expand Down

0 comments on commit 7b4badf

Please sign in to comment.