https://github.com/clayborg created 
https://github.com/llvm/llvm-project/pull/96800

When we check for the "struct CustomType" in the NODWP, we can just make sure 
that we have both types showing up, the next tests will validate the types are 
correct. Also added a "-DAG" to the integer and float types. This should fix 
the flakiness in this test.

>From a874efd2b746c1f4fcf426f7d2426d28230e7714 Mon Sep 17 00:00:00 2001
From: Greg Clayton <clayb...@gmail.com>
Date: Wed, 26 Jun 2024 10:12:05 -0700
Subject: [PATCH] Fix the test to deal with non-deterministic output.

When we check for the "struct CustomType" in the NODWP, we can just make sure 
that we have both types showing up, the next tests will validate the types are 
correct. Also added a "-DAG" to the integer and float types. This should fix 
the flakiness in this test.
---
 .../DWARF/x86/dwp-foreign-type-units.cpp      | 22 +++++--------------
 1 file changed, 6 insertions(+), 16 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 8dd5a5472ed4c..4df1b33dd7d91 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
@@ -30,24 +30,14 @@
 // RUN:   -o "type lookup CustomType" \
 // RUN:   -b %t | FileCheck %s --check-prefix=NODWP
 // NODWP: (lldb) type lookup IntegerType
-// NODWP-NEXT: int
-// NODWP-NEXT: unsigned int
+// NODWP-DAG: int
+// NODWP-DAG: unsigned int
 // NODWP: (lldb) type lookup FloatType
-// NODWP-NEXT: double
-// NODWP-NEXT: float
+// NODWP-DAG: double
+// NODWP-DAG: float
 // NODWP: (lldb) type lookup CustomType
-// NODWP-NEXT: struct CustomType {
-// NODWP-NEXT:     typedef int IntegerType;
-// NODWP-NEXT:     typedef double FloatType;
-// NODWP-NEXT:     CustomType::IntegerType x;
-// NODWP-NEXT:     CustomType::FloatType y;
-// NODWP-NEXT: }
-// NODWP-NEXT: struct CustomType {
-// NODWP-NEXT:     typedef unsigned int IntegerType;
-// NODWP-NEXT:     typedef float FloatType;
-// NODWP-NEXT:     CustomType::IntegerType x;
-// NODWP-NEXT:     CustomType::FloatType y;
-// NODWP-NEXT: }
+// NODWP: struct CustomType {
+// NODWP: struct CustomType {
 
 // Check when we make the .dwp file with %t.main.dwo first so it will
 // pick the type unit from %t.main.dwo. Verify we find only the types from

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to