[Lldb-commits] [lldb] 5c1249f - [lldb/crashlog] Fix flaky tests that mixed stderr and stdout (#237920)

via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 2 11:54:31 PST 2026


Author: Yao Qi
Date: 2026-11-02T11:54:25-08:00
New Revision: 5c1249f233942a821df1b58ba7706304693fa12b

URL: https://github.com/llvm/llvm-project/commit/5c1249f233942a821df1b58ba7706304693fa12b
DIFF: https://github.com/llvm/llvm-project/commit/5c1249f233942a821df1b58ba7706304693fa12b.diff

LOG: [lldb/crashlog] Fix flaky tests that mixed stderr and stdout (#237920)

`interactive_crashlog_legacy.test`, `interactive_crashlog_json.test` and
`interactive_crashlog_arm64_register.test` run `crashlog -a -t` on the
binary
built from `Inputs/interactive_crashlog/multithread-test.yaml` and pipes
`2>&1`
into `FileCheck`.  `eb5f248268fb` report a missing debug map object
file. The `N_OSO` in `multithread-test.yaml` names the `.o` above, which
does not exist, so each of these runs prints an error once from the
event handler thread, and main thread writes the output of
`process status --verbose`, so `2>&1` joins the two writers in one pipe
and nothing order them.

The fix is to drop `2>&1` from the RUN line of the three tests, so every
`CHECK`
line matches stdout and stderr carries only the debug map `error:`.

Added: 
    

Modified: 
    lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_arm64_register.test
    lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_json.test
    lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_legacy.test

Removed: 
    


################################################################################
diff  --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_arm64_register.test b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_arm64_register.test
index 9da21d9aab78d8..37b9eca5386023 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_arm64_register.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_arm64_register.test
@@ -4,7 +4,7 @@
 # RUN: yaml2obj %S/Inputs/interactive_crashlog/multithread-test.yaml > %t.dir/multithread-test
 # RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
 # RUN: -o 'crashlog -a -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.ips' \
-# RUN: -o "thread list" -o "bt all" -o "register read" 2>&1 | FileCheck %s
+# RUN: -o "thread list" -o "bt all" -o "register read" | FileCheck %s
 
 # CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands
 

diff  --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_json.test b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_json.test
index 2509f2e88d9b20..3eb202f8b897d7 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_json.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_json.test
@@ -4,7 +4,7 @@
 # RUN: yaml2obj %S/Inputs/interactive_crashlog/multithread-test.yaml > %t.dir/multithread-test
 # RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
 # RUN: -o 'crashlog -a -i -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.ips' \
-# RUN: -o "thread list" -o "bt all" 2>&1 | FileCheck %s
+# RUN: -o "thread list" -o "bt all" | FileCheck %s
 
 # CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands
 

diff  --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_legacy.test b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_legacy.test
index 74ced35fcfae01..92fe997a4b1d39 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_legacy.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_legacy.test
@@ -4,7 +4,7 @@
 # RUN: yaml2obj %S/Inputs/interactive_crashlog/multithread-test.yaml > %t.dir/multithread-test
 # RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
 # RUN: -o 'crashlog -a -i -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.crash' \
-# RUN: -o "thread list" -o "bt all" 2>&1 | FileCheck %s
+# RUN: -o "thread list" -o "bt all" | FileCheck %s
 
 # CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands
 


        


More information about the lldb-commits mailing list