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

>From 7e425bee3663dc7e5ad34b0e61bd27cdb57b8339 Mon Sep 17 00:00:00 2001
From: Raphael Isemann <[email protected]>
Date: Mon, 8 Jun 2026 11:11:02 +0100
Subject: [PATCH] [lldb][test] Fix duplicate error messages in
 expect_expr/var_path

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.
---
 lldb/packages/Python/lldbsuite/test/lldbtest.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py 
b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 76b6fe7d7f637..76f3fcd9b3e9e 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -292,7 +292,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
@@ -335,7 +335,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.
@@ -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."""

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

Reply via email to