From 5bb3c15b97c054a8a846e6c6c4f56663f64d1d8e Mon Sep 17 00:00:00 2001 From: r12f Date: Sat, 16 Dec 2023 05:20:44 +0000 Subject: [PATCH] Add test. --- tests/commands/heap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/commands/heap.py b/tests/commands/heap.py index 983d4a0ea..0f4d4ac1f 100644 --- a/tests/commands/heap.py +++ b/tests/commands/heap.py @@ -94,6 +94,14 @@ def test_cmd_heap_chunks_mult_heaps(self): self.assertIn("Chunk(addr=", res) self.assertIn("top chunk", res) + def test_cmd_heap_chunks_summary(self): + cmd = "heap chunks --summary" + target = _target("heap") + self.assertFailIfInactiveSession(gdb_run_cmd(cmd, target=target)) + res = gdb_run_silent_cmd(cmd, target=target) + self.assertNoException(res) + self.assertIn("== Chunk distribution by size", res) + self.assertIn("== Chunk distribution by flag", res) def test_cmd_heap_bins_fast(self): cmd = "heap bins fast"