Commit 2645bfab29 for frr

commit 2645bfab2927ceb87803f280a206e24d2a4a24f1
Author: Lincoln Thurlow <lincoln@isi.edu>
Date:   Mon Nov 30 14:06:17 2026 -0800

    tests: add a memory leak check to pathd PCEP test

    The pathd PCEP steering topotest does not check pathd for memory
    leaks at teardown.

    The check needs pathd's PCEP shutdown leak fixes, which the commit
    that added the topotest does not depend on.

    This commit adds test_memory_leak, which reports what pathd leaked
    when the topotest memory leak check is enabled.

    Signed-off-by: Lincoln Thurlow <lincoln@isi.edu>

diff --git a/tests/topotests/pathd_pcep_steering_topo1/test_pathd_pcep_steering_topo1.py b/tests/topotests/pathd_pcep_steering_topo1/test_pathd_pcep_steering_topo1.py
index 8c20f43e25..9a72db4e64 100644
--- a/tests/topotests/pathd_pcep_steering_topo1/test_pathd_pcep_steering_topo1.py
+++ b/tests/topotests/pathd_pcep_steering_topo1/test_pathd_pcep_steering_topo1.py
@@ -615,6 +615,15 @@ def test_steering_route_withdrawn_on_policy_delete():
     assert result is None, "steering route not withdrawn: {}".format(result)


+def test_memory_leak():
+    "Run the memory leak test and report results."
+
+    tgen = get_topogen()
+    if not tgen.is_memleak_enabled():
+        pytest.skip("Memory leak test/report is disabled")
+    tgen.report_memory_leaks()
+
+
 if __name__ == "__main__":
     args = ["-s"] + sys.argv[1:]
     sys.exit(pytest.main(args))