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

Vladimir Vereschaka via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 26 18:04:57 PDT 2024


vvereschaka wrote:

@clayborg ,
the test is still flaky with these changes on the windows build/target host. Here are two failed test outputs. They are a bit different. 

failure 1:
```
# executed command: 'd:\projects\llvm-project\lldb\build-lldb-win\bin\filecheck.exe' 'D:\projects\llvm-project\lldb\llvm-project\lldb\test\Shell\SymbolFile\DWARF\x86\dwp-foreign-type-units.cpp' --check-prefix=NODWP
# .---command stderr------------
# | D:\projects\llvm-project\lldb\llvm-project\lldb\test\Shell\SymbolFile\DWARF\x86\dwp-foreign-type-units.cpp:35:11: error: NODWP: expected string not found in input
# | // NODWP: (lldb) type lookup FloatType
# |           ^
# | <stdin>:14:22: note: scanning from here
# |  typedef unsigned int IntegerType;
# |                      ^
# | <stdin>:15:3: note: possible intended match here
# |  typedef float FloatType;
# |   ^
# |
# | Input file: <stdin>
# | Check file: D:\projects\llvm-project\lldb\llvm-project\lldb\test\Shell\SymbolFile\DWARF\x86\dwp-foreign-type-units.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |             9: (lldb) type lookup FloatType
# |            10: double
# |            11: float
# |            12: (lldb) type lookup CustomType
# |            13: struct CustomType {
# |            14:  typedef unsigned int IntegerType;
# | check:35'0                          X~~~~~~~~~~~~~ error: no match found
# |            15:  typedef float FloatType;
# | check:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:35'1       ?                        possible intended match
# |            16:  CustomType::IntegerType x;
# | check:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            17:  CustomType::FloatType y;
# | check:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            18: }
# | check:35'0     ~~
# |            19: struct CustomType {
# | check:35'0     ~~~~~~~~~~~~~~~~~~~~
# |            20:  typedef int IntegerType;
# | check:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
```

failure 2:
```
# executed command: 'd:\projects\llvm-project\lldb\build-lldb-win\bin\filecheck.exe' 'D:\projects\llvm-project\lldb\llvm-project\lldb\test\Shell\SymbolFile\DWARF\x86\dwp-foreign-type-units.cpp' --check-prefix=NODWP
# .---command stderr------------
# | D:\projects\llvm-project\lldb\llvm-project\lldb\test\Shell\SymbolFile\DWARF\x86\dwp-foreign-type-units.cpp:35:11: error: NODWP: expected string not found in input
# | // NODWP: (lldb) type lookup FloatType
# |           ^
# | <stdin>:20:22: note: scanning from here
# |  typedef unsigned int IntegerType;
# |                      ^
# | <stdin>:21:3: note: possible intended match here
# |  typedef float FloatType;
# |   ^
# |
# | Input file: <stdin>
# | Check file: D:\projects\llvm-project\lldb\llvm-project\lldb\test\Shell\SymbolFile\DWARF\x86\dwp-foreign-type-units.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            15:  typedef double FloatType;
# |            16:  CustomType::IntegerType x;
# |            17:  CustomType::FloatType y;
# |            18: }
# |            19: struct CustomType {
# |            20:  typedef unsigned int IntegerType;
# | check:35'0                          X~~~~~~~~~~~~~ error: no match found
# |            21:  typedef float FloatType;
# | check:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:35'1       ?                        possible intended match
# |            22:  CustomType::IntegerType x;
# | check:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            23:  CustomType::FloatType y;
# | check:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            24: }
# | check:35'0     ~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
```

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


More information about the lldb-commits mailing list