99 ERROR_INACTIVE_SESSION_MESSAGE ,
1010 debug_target ,
1111 findlines ,
12+ is_glibc_ge ,
1213 is_32b ,
1314 is_64b ,
1415)
@@ -21,6 +22,7 @@ def setUp(self) -> None:
2122 self ._target = debug_target ("heap" )
2223 return super ().setUp ()
2324
25+ @pytest .mark .skipif (is_glibc_ge (2 , 43 ), reason = f"Skipped for glibc >= 2.43" )
2426 def test_cmd_heap_arenas (self ):
2527 gdb = self ._gdb
2628 cmd = "heap arenas"
@@ -32,6 +34,7 @@ def test_cmd_heap_arenas(self):
3234 res = gdb .execute (cmd , to_string = True )
3335 self .assertIn ("Arena(base=" , res )
3436
37+ @pytest .mark .skipif (is_glibc_ge (2 , 43 ), reason = f"Skipped for glibc >= 2.43" )
3538 def test_cmd_heap_set_arena (self ):
3639 gdb = self ._gdb
3740 cmd = "heap set-arena &main_arena"
@@ -67,6 +70,7 @@ def test_cmd_heap_chunk_with_number(self):
6770 chunklines = findlines ("Chunk(addr=" , res )
6871 self .assertEqual (len (chunklines ), 2 )
6972
73+ @pytest .mark .skipif (is_glibc_ge (2 , 43 ), reason = f"Skipped for glibc >= 2.43" )
7074 def test_cmd_heap_chunks (self ):
7175 gdb = self ._gdb
7276 cmd = "heap chunks"
@@ -91,6 +95,7 @@ def test_cmd_heap_chunks_summary(self):
9195 self .assertIn ("== Chunk distribution by size" , res )
9296 self .assertIn ("== Chunk distribution by flag" , res )
9397
98+ @pytest .mark .skipif (is_glibc_ge (2 , 43 ), reason = f"Skipped for glibc >= 2.43" )
9499 def test_cmd_heap_chunks_min_size_filter (self ):
95100 gdb = self ._gdb
96101 self .assertEqual (
@@ -148,6 +153,7 @@ def setUp(self) -> None:
148153 self ._target = debug_target ("heap-non-main" )
149154 return super ().setUp ()
150155
156+ @pytest .mark .skipif (is_glibc_ge (2 , 43 ), reason = f"Skipped for glibc >= 2.43" )
151157 def test_cmd_heap_chunks (self ):
152158 gdb = self ._gdb
153159 cmd = "heap chunks"
@@ -169,6 +175,7 @@ def test_cmd_heap_chunks(self):
169175 # make sure that the chunks of each arena are distinct
170176 self .assertNotEqual (chunks , non_main_chunks )
171177
178+ @pytest .mark .skipif (is_glibc_ge (2 , 43 ), reason = f"Skipped for glibc >= 2.43" )
172179 def test_cmd_heap_bins_non_main (self ):
173180 gdb = self ._gdb
174181 gef = self ._gef
@@ -181,6 +188,7 @@ def test_cmd_heap_bins_non_main(self):
181188 self .assertIn ("size=0x20" , res )
182189
183190 @pytest .mark .skipif (ARCH not in ("i686" , "x86_64" ,), reason = f"Skipped for { ARCH } " )
191+ @pytest .mark .skipif (is_glibc_ge (2 , 42 ), reason = f"Skipped for glibc >= 2.42" )
184192 def test_cmd_heap_bins_tcache (self ):
185193 gdb = self ._gdb
186194 gdb .execute ("run" )
@@ -202,6 +210,7 @@ def setUp(self) -> None:
202210 self ._target = debug_target ("heap-multiple-heaps" )
203211 return super ().setUp ()
204212
213+ @pytest .mark .skipif (is_glibc_ge (2 , 43 ), reason = f"Skipped for glibc >= 2.43" )
205214 def test_cmd_heap_chunks_mult_heaps (self ):
206215 gdb = self ._gdb
207216
@@ -259,6 +268,7 @@ def setUp(self) -> None:
259268 self .expected_unsorted_bin_size = 0x430 if ARCH == "i686" or is_64b () else 0x428
260269 return super ().setUp ()
261270
271+ @pytest .mark .skipif (is_glibc_ge (2 , 43 ), reason = f"Skipped for glibc >= 2.43" )
262272 def test_cmd_heap_bins_large (self ):
263273 gdb = self ._gdb
264274 gdb .execute ("run" )
@@ -268,6 +278,7 @@ def test_cmd_heap_bins_large(self):
268278 self .assertIn ("Chunk(addr=" , res )
269279 self .assertIn (f"size={ self .expected_large_bin_size :#x} " , res )
270280
281+ @pytest .mark .skipif (is_glibc_ge (2 , 43 ), reason = f"Skipped for glibc >= 2.43" )
271282 def test_cmd_heap_bins_small (self ):
272283 gdb = self ._gdb
273284 cmd = "heap bins small"
@@ -278,6 +289,7 @@ def test_cmd_heap_bins_small(self):
278289 self .assertIn ("Chunk(addr=" , res )
279290 self .assertIn (f"size={ self .expected_small_bin_size :#x} " , res )
280291
292+ @pytest .mark .skipif (is_glibc_ge (2 , 43 ), reason = f"Skipped for glibc >= 2.43" )
281293 def test_cmd_heap_bins_unsorted (self ):
282294 gdb = self ._gdb
283295 gdb .execute ("run" )
@@ -295,6 +307,7 @@ def setUp(self) -> None:
295307 return super ().setUp ()
296308
297309 @pytest .mark .skipif (ARCH not in ("i686" , "x86_64" ), reason = f"Skipped for { ARCH } " )
310+ @pytest .mark .skipif (is_glibc_ge (2 , 42 ), reason = f"Skipped for glibc >= 2.42" )
298311 def test_cmd_heap_bins_tcache_all (self ):
299312 gdb = self ._gdb
300313 gdb .execute ("run" )
0 commit comments