[llvm] 7b4badf - [test][llvm-dwarfdump] Use --implicit-check-not to simplify test checks

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 03:23:11 PST 2020


Author: James Henderson
Date: 2020-01-03T11:22:20Z
New Revision: 7b4badf6f9ad93209d2c9dde60da25076d5c91c8

URL: https://github.com/llvm/llvm-project/commit/7b4badf6f9ad93209d2c9dde60da25076d5c91c8
DIFF: https://github.com/llvm/llvm-project/commit/7b4badf6f9ad93209d2c9dde60da25076d5c91c8.diff

LOG: [test][llvm-dwarfdump] Use --implicit-check-not to simplify test checks

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

Added: 
    

Modified: 
    llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test b/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
index 04ec0fd4d220..0a5d15414c06 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
@@ -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.
@@ -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]
@@ -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
 


        


More information about the llvm-commits mailing list