From d99c06699624d97afa0fbb2b666fec795fde5a7d Mon Sep 17 00:00:00 2001
From: pompolic <pompolic@special-circumstanc.es>
Date: Tue, 9 May 2023 17:26:15 +0200
Subject: [PATCH] Skip some more tests if we're using hammer stats

---
 gdb-port/tests/unit/top-level-parse.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gdb-port/tests/unit/top-level-parse.py b/gdb-port/tests/unit/top-level-parse.py
index 199fdb6..94949f7 100644
--- a/gdb-port/tests/unit/top-level-parse.py
+++ b/gdb-port/tests/unit/top-level-parse.py
@@ -82,6 +82,7 @@ class TopLevelParseStateManagement(unittest.TestCase):
 	# is added to the parser on top of the stack of stacks.
 	# Testing here that after calling enter_h_do_parse, then enter_h_arena_malloc_raw
 	# the latter will attribute the allocation to the parser we just set
+	@unittest.skipIf(top_level_parse.memory_stat_method == HammerMemoryStatisticsMethod.DETAILED_ARENA_STATS, "malloc-based allocation counts disabled")
 	def test_enter_h_arena_malloc_raw_top_of_stack(self):
 		self.top_level_parse.parser_stacks.append(self.ps1)
 		self.top_level_parse.parser_objs[32] = self.parser1
@@ -100,11 +101,13 @@ class TopLevelParseStateManagement(unittest.TestCase):
 		#self.assertEqual(self.top_level_parse.parser_stacks[-1].p_stack[-1].bytes_used[int(self._arena.address)], 256)
 		self.assertEqual(self.top_level_parse.parser_stacks[-1].p_stack[-1].bytes_used[int(self._arena)], 256)
 
+	@unittest.skipIf(top_level_parse.memory_stat_method == HammerMemoryStatisticsMethod.DETAILED_ARENA_STATS, "malloc-based allocation counts disabled")
 	def test_enter_h_arena_malloc_raw_no_parser(self):
 		self.top_level_parse.parser_stacks.append(self.ps1)
 		self.top_level_parse.enter_h_arena_malloc_raw(256)
 		self.assertEqual(self.top_level_parse.parser_stacks[-1].unclaimed_mem_use, 256)
 
+	@unittest.skipIf(top_level_parse.memory_stat_method == HammerMemoryStatisticsMethod.DETAILED_ARENA_STATS, "malloc-based allocation counts disabled")
 	def test_enter_h_arena_malloc_raw_no_stack(self):
 		self.top_level_parse.enter_h_arena_malloc_raw(256)
 		self.assertEqual(self.top_level_parse.unclaimed_mem_use, 256)
-- 
GitLab