Author: Raphael Isemann
Date: 2026-06-17T09:10:39+01:00
New Revision: 38f121e88adb4b450d116c2786086ccd160cef81

URL: 
https://github.com/llvm/llvm-project/commit/38f121e88adb4b450d116c2786086ccd160cef81
DIFF: 
https://github.com/llvm/llvm-project/commit/38f121e88adb4b450d116c2786086ccd160cef81.diff

LOG: [lldb][test] Fix duplicate error messages in expect_expr/var_path (#202310)

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.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/lldbtest.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py 
b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 6fb3045cbbe45..416b357754015 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -293,7 +293,7 @@ def __init__(
         self.children = children
         self.dereference = dereference
 
-    def check_value(self, test_base, val, error_msg=None):
+    def check_value(self, test_base, val, error_msg=""):
         """
         Checks that the given value matches the currently set properties
         of this ValueCheck. If a match failed, the given TestBase will
@@ -336,7 +336,7 @@ def check_value(self, test_base, val, error_msg=None):
         if self.dereference is not None:
             self.dereference.check_value(test_base, val.Dereference(), 
error_msg)
 
-    def check_value_children(self, test_base, val, error_msg=None):
+    def check_value_children(self, test_base, val, error_msg=""):
         """
         Checks that the children of a SBValue match a certain structure and
         have certain properties.
@@ -2970,7 +2970,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(
@@ -2997,7 +2997,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."""


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to