[Lldb-commits] [lldb] [lldb][test] Fix duplicate error messages in expect_expr/var_path (PR #202310)

via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 8 03:13:26 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Raphael Isemann (Teemperor)

<details>
<summary>Changes</summary>

The error message field for expect_* methods always prints the value object, so there is no need to specify a custom error message that then just prints the object too.

This fixes the duplicate value object printout on test failures.

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


1 Files Affected:

- (modified) lldb/packages/Python/lldbsuite/test/lldbtest.py (+2-2) 


``````````diff
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 76b6fe7d7f637..f7d0d317f0535 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -2923,7 +2923,7 @@ def expect_expr(
             summary=result_summary,
             children=result_children,
         )
-        value_check.check_value(self, eval_result, str(eval_result))
+        value_check.check_value(self, eval_result)
         return eval_result
 
     def expect_var_path(
@@ -2950,7 +2950,7 @@ def expect_var_path(
         value_check = ValueCheck(
             type=type, value=value, summary=summary, children=children
         )
-        value_check.check_value(self, eval_result, str(eval_result))
+        value_check.check_value(self, eval_result)
         return eval_result
 
     """Assert that an lldb.SBError is in the "success" state."""

``````````

</details>


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


More information about the lldb-commits mailing list