[Lldb-commits] [lldb] Fix the test to deal with non-deterministic output. (PR #96800)

via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 26 10:15:29 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Greg Clayton (clayborg)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/96800.diff


1 Files Affected:

- (modified) lldb/test/Shell/SymbolFile/DWARF/x86/dwp-foreign-type-units.cpp (+6-16) 


``````````diff
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

``````````

</details>


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


More information about the lldb-commits mailing list