[Lldb-commits] [lldb] [lldb] Fix the flaky test dwp-foreign-type-units.cpp. (PR #98237)

Zequan Wu via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 9 15:53:39 PDT 2024


https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/98237

Use `--match-full-lines` with FileCheck. Otherwise, the checks for `int` and `unsigned int` will match to the fields inside two `CustomType`s and FileCheck will start scanning from there, causing string not found error.

>From f103032c6218dc6cddc3c5d267aed86adc2aac56 Mon Sep 17 00:00:00 2001
From: Zequan Wu <zequanwu at google.com>
Date: Tue, 9 Jul 2024 15:47:38 -0700
Subject: [PATCH] [lldb] Fix the flaky test dwp-foreign-type-units.cpp.

Use `--match-full-lines` with FileCheck. Otherwise, the checks for `int` and `unsigned int` will match to the fields inside two `CustomType`s and FileCheck will start scanning from there, causing stirng not found error.
---
 .../Shell/SymbolFile/DWARF/x86/dwp-foreign-type-units.cpp     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/dwp-foreign-type-units.cpp b/lldb/test/Shell/SymbolFile/DWARF/x86/dwp-foreign-type-units.cpp
index ef15d418b4cfe..415b4850a244c 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/dwp-foreign-type-units.cpp
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/dwp-foreign-type-units.cpp
@@ -1,6 +1,4 @@
 // REQUIRES: lld
-// Is flaky on Windows.
-// UNSUPPORTED: system-windows
 
 // This test will make a type that will be compiled differently into two
 // different .dwo files in a type unit with the same type hash, but with
@@ -30,7 +28,7 @@
 // RUN:   -o "type lookup IntegerType" \
 // RUN:   -o "type lookup FloatType" \
 // RUN:   -o "type lookup CustomType" \
-// RUN:   -b %t | FileCheck %s --check-prefix=NODWP
+// RUN:   -b %t | FileCheck %s --check-prefix=NODWP --match-full-lines
 // NODWP: (lldb) type lookup IntegerType
 // NODWP-DAG: int
 // NODWP-DAG: unsigned int



More information about the lldb-commits mailing list