[Lldb-commits] [lldb] 8a44cd7 - [NFC][lldb-dap][test] show the expected value in the error message. (#142030)

via lldb-commits lldb-commits at lists.llvm.org
Thu May 29 15:20:12 PDT 2025


Author: Ebuka Ezike
Date: 2025-05-29T23:20:09+01:00
New Revision: 8a44cd74bdf8a650d85e144a640c595e1945e906

URL: https://github.com/llvm/llvm-project/commit/8a44cd74bdf8a650d85e144a640c595e1945e906
DIFF: https://github.com/llvm/llvm-project/commit/8a44cd74bdf8a650d85e144a640c595e1945e906.diff

LOG: [NFC][lldb-dap][test] show the expected value in the error message. (#142030)

Show the expected value in the error message so we can see the expected
value without searching through the log messages.

Related #141689

Added: 
    

Modified: 
    lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py b/lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py
index ae144ebdca46b..9cfa9b20f6051 100644
--- a/lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py
+++ b/lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py
@@ -45,9 +45,14 @@ def test_optimized_variable(self):
         self.continue_to_breakpoints(breakpoint_ids)
         optimized_variable = self.dap_server.get_local_variable("argc")
 
-        self.assertTrue(optimized_variable["value"].startswith("<error:"))
+        value: str = optimized_variable["value"]
+        self.assertTrue(
+            value.startswith("<error:"),
+            f"expect error for value: '{value}'",
+        )
         error_msg = optimized_variable["$__lldb_extensions"]["error"]
         self.assertTrue(
             ("could not evaluate DW_OP_entry_value: no parent function" in error_msg)
             or ("variable not available" in error_msg)
         )
+        self.continue_to_exit()


        


More information about the lldb-commits mailing list