[PATCH] D103676: [test] Fix accidental match in parent_recurse_depth.s

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 4 02:00:23 PDT 2021


thopre created this revision.
thopre added reviewers: gbreynoo, Higuoxing, MaskRay, shchenz, jhenderson.
Herald added subscribers: cmtice, pengfei.
thopre requested review of this revision.
Herald added a project: LLVM.

The CHECK-NOT directives in
tools/llvm-dwarfdump/X86/parent_recurse_depth.s can accidentally match
something in the path of the object file created by yaml2obj, for
example:

llvm-project/llvm/test/tools/llvm-dwarfdump/X86/parent_recurse_depth.s:13:12:
error: ONE-NOT: excluded string found in input

  ^

<stdin>:1:22: note: found here
builds/llvm-projects/mainline/release/test/tools/llvm-dwarfdump/X86/Output/parent_recurse_depth.s.tmp.o: file format elf64-x86-64

  ^~~~

This commit alleviate this issue by consuming the file name from the
output, forcing all the CHECK-NOT to match what comes after.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103676

Files:
  llvm/test/tools/llvm-dwarfdump/X86/parent_recurse_depth.s


Index: llvm/test/tools/llvm-dwarfdump/X86/parent_recurse_depth.s
===================================================================
--- llvm/test/tools/llvm-dwarfdump/X86/parent_recurse_depth.s
+++ llvm/test/tools/llvm-dwarfdump/X86/parent_recurse_depth.s
@@ -1,8 +1,10 @@
 # RUN: yaml2obj %s -o %t.o
-# RUN: llvm-dwarfdump --debug-info=0x00000020 -p -parent-recurse-depth 0 %t.o | FileCheck %s --check-prefix=ALL
-# RUN: llvm-dwarfdump --debug-info=0x00000020 -p -parent-recurse-depth 1 %t.o | FileCheck %s --check-prefix=ONE
-# RUN: llvm-dwarfdump --debug-info=0x00000020 -p -parent-recurse-depth 2 %t.o | FileCheck %s --check-prefix=TWO
-# RUN: llvm-dwarfdump --debug-info=0x00000020 -p -parent-recurse-depth 3 %t.o | FileCheck %s --check-prefix=ALL
+# RUN: llvm-dwarfdump --debug-info=0x00000020 -p -parent-recurse-depth 0 %t.o | FileCheck %s --check-prefixes=COMMON,ALL
+# RUN: llvm-dwarfdump --debug-info=0x00000020 -p -parent-recurse-depth 1 %t.o | FileCheck %s --check-prefixes=COMMON,ONE
+# RUN: llvm-dwarfdump --debug-info=0x00000020 -p -parent-recurse-depth 2 %t.o | FileCheck %s --check-prefixes=COMMON,TWO
+# RUN: llvm-dwarfdump --debug-info=0x00000020 -p -parent-recurse-depth 3 %t.o | FileCheck %s --check-prefixes=COMMON,ALL
+
+# COMMON: .o: file format
 
 # ALL: by_hand
 # ALL: main


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103676.349790.patch
Type: text/x-patch
Size: 1316 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210604/f7ec8d8c/attachment.bin>


More information about the llvm-commits mailing list