[Lldb-commits] [lldb] [lldb] Fix TestStatisticsAPI after 9293fc798152 (PR #94683)

via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 6 13:49:26 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Alex Langford (bulbazord)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/94683.diff


1 Files Affected:

- (modified) lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py (+4-3) 


``````````diff
diff --git a/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py b/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py
index 851097bdfecf2..f06c9ae14bb7a 100644
--- a/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py
+++ b/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py
@@ -85,14 +85,15 @@ def test_stats_api(self):
         stats_summary.GetAsJSON(stream_summary)
         debug_stats_summary = json.loads(stream_summary.GetData())
         self.assertNotIn("modules", debug_stats_summary)
-        self.assertNotIn("memory", debug_stats_summary)
         self.assertNotIn("commands", debug_stats_summary)
 
         # Summary values should be the same as in full statistics.
-        # Except the parse time on Mac OS X is not deterministic.
+        # The exceptions to this are:
+        # - The parse time on Mac OS X is not deterministic.
+        # - Memory usage may grow over time due to the use of ConstString.
         for key, value in debug_stats_summary.items():
             self.assertIn(key, debug_stats)
-            if key != "targets" and not key.endswith("Time"):
+            if key != "memory" and key != "targets" and not key.endswith("Time"):
                 self.assertEqual(debug_stats[key], value)
 
     def test_command_stats_api(self):

``````````

</details>


https://github.com/llvm/llvm-project/pull/94683


More information about the lldb-commits mailing list