https://github.com/Teemperor updated https://github.com/llvm/llvm-project/pull/202310
>From 9960ec92a856a290a8a7c0b21b8141b18807b401 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 b01dce6a9759a..c3a67ea70ba0b 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. @@ -2938,7 +2938,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( @@ -2965,7 +2965,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
