[llvm] [cross-project] Add tests for LLDB data-formatters for llvm::ArrayRef (PR #173238)
Mikael Holmen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 8 04:04:39 PST 2026
================
@@ -0,0 +1,25 @@
+# RUN: split-file %s %t
+# RUN: lldb -b -x -o 'command script import %llvm_src_root/utils/lldbDataFormatters.py' -s %t/commands.input %llvm_tools_dir/check-lldb-llvm-support-arrayref | FileCheck %t/checks
+
+#--- commands.input
+b main
+run
+p ArrayRef
+p MutableArrayRef
+
+#--- checks
+# CHECK: (lldb) p ArrayRef
+# CHECK-NEXT: (llvm::ArrayRef<int>) size=3 {
----------------
mikaelholmen wrote:
Hi @Michael137
I randomly see this testcase failing on a downstream build bot. I've seen failures like this:
```
/repo/llvm/build-all-builtins/projects/cross-project-tests/debuginfo-tests/llvm-prettyprinters/lldb/Output/arrayref.test.tmp/checks:2:15: error: CHECK-NEXT: is not on the line after the previous match
# CHECK-NEXT: (llvm::ArrayRef<int>) size=3 {
^
<stdin>:20:1: note: 'next' match was here
(llvm::ArrayRef<int>) size=3 {
^
<stdin>:18:18: note: previous match ended here
(lldb) p ArrayRef
^
<stdin>:19:1: note: non-matching line after previous match is here
1 location added to breakpoint 1
^
Input file: <stdin>
Check file: /repo/llvm/build-all-builtins/projects/cross-project-tests/debuginfo-tests/llvm-prettyprinters/lldb/Output/arrayref.test.tmp/checks
-dump-input=help explains the following input dump.
Input was:
<<<<<<
.
.
.
15: 7
16: -> 8 int main() { return 0; }
17: ^
18: (lldb) p ArrayRef
19: 1 location added to breakpoint 1
20: (llvm::ArrayRef<int>) size=3 {
next:2 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: match on wrong line
21: [0] = 1
22: [1] = 2
23: [2] = 3
24: }
25: (lldb) p MutableArrayRef
.
.
.
>>>>>>
--
********************
Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
1 warning(s) in tests
********************
Failed Tests (1):
cross-project-tests :: debuginfo-tests/llvm-prettyprinters/lldb/arrayref.test
```
so there something unexpected between the expected lines in the output.
It happens now and then. Any idea what the problem is and if it can be fixed?
https://github.com/llvm/llvm-project/pull/173238
More information about the llvm-commits
mailing list