[Lldb-commits] [lldb] [lldb][test] Print command output when it unexpectedly passes (PR #224021)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 16 07:04:23 PDT 2026


================
@@ -2529,6 +2529,14 @@ def switch_to_thread_with_stop_reason(self, stop_reason):
             if matched:
                 self.runCmd("thread select %s" % matched.group(1))
 
+    def _assert_command_failed(self, command, res):
+        fail_msg = "Command '" + command + "' is expected to fail!"
+        if res.GetOutput():
+            fail_msg += "\nOutput: " + res.GetOutput()
+        if res.GetError():
+            fail_msg += "\nError: " + res.GetError()
----------------
charles-zablit wrote:

This could be done in a follow up: For readability, should we split using `---` when we have 2 very long outputs?

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


More information about the lldb-commits mailing list