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

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 8 03:12:45 PDT 2026


https://github.com/Teemperor created https://github.com/llvm/llvm-project/pull/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.

>From 10c815cf2ebfdcbb46288663ed86f97f7a6a8151 Mon Sep 17 00:00:00 2001
From: Raphael Isemann <rise at apple.com>
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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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."""



More information about the lldb-commits mailing list