Commit 70b3dcd105 for frr

commit 70b3dcd105fdb01bf741235cb6abe4657c738db5
Author: Louis Scalbert <louis.scalbert@6wind.com>
Date:   Fri Oct 30 11:44:37 2026 +0100

    tests: nhrp_redundancy, check nhc2 shortcut removal

    Ensure that nhc2's shortcut to the host via nhc1 is removed before
    proceeding to the next test_redundancy_shortcut_backup test.

    If the shortcut is still present when test_redundancy_shortcut_backup()
    runs, traffic from nhc2 to host in reply to the ping will not go through
    nhs2. Therefore, nhs2 won't announce traffic indication to nhc2 that is
    needed to create the cache entry on nhc2.

    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>

diff --git a/tests/topotests/nhrp_redundancy/nhc1/nhrp_shortcut_absent.json b/tests/topotests/nhrp_redundancy/nhc1/nhrp_shortcut_absent.json
deleted file mode 100644
index 78563cb902..0000000000
--- a/tests/topotests/nhrp_redundancy/nhc1/nhrp_shortcut_absent.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "attr":{
-    "entriesCount":0
-  }
-}
diff --git a/tests/topotests/nhrp_redundancy/test_nhrp_redundancy.py b/tests/topotests/nhrp_redundancy/test_nhrp_redundancy.py
index 64a5488b01..5a3f2e3338 100644
--- a/tests/topotests/nhrp_redundancy/test_nhrp_redundancy.py
+++ b/tests/topotests/nhrp_redundancy/test_nhrp_redundancy.py
@@ -409,15 +409,18 @@ def test_redundancy_shortcut():
     PING_PID = None

     logger.info("check the shortcut disappears because of no traffic")
-    json_file = "{}/{}/nhrp_shortcut_absent.json".format(CWD, nhc1.name)
-    expected = json.loads(open(json_file).read())
-    test_func = partial(
-        router_nhrp_json_cmp, nhc1, "show ip nhrp shortcut json", expected
-    )
-    _, result = topotest.run_and_expect(test_func, None, count=60, wait=1)

-    assertmsg = '"{}" "show ip nhrp shortcut" output mismatches'.format(nhc1.name)
-    assert result is None, assertmsg
+    expected = {"attr": {"entriesCount": 0}}
+
+    for rname in ("nhc1", "nhc2"):
+        router = tgen.gears[rname]
+        test_func = partial(
+            router_nhrp_json_cmp, router, "show ip nhrp shortcut json", expected
+        )
+        _, result = topotest.run_and_expect(test_func, None, count=60, wait=1)
+
+        assertmsg = '"{}" "show ip nhrp shortcut" output mismatches'.format(rname)
+        assert result is None, assertmsg


 def test_redundancy_shortcut_backup():
@@ -518,8 +521,7 @@ def test_redundancy_shortcut_backup():
     assertmsg = '"{}" "show ip route nhrp" output mismatches'.format(nhc1.name)
     assert result is None, assertmsg

-    json_file = "{}/{}/nhrp_shortcut_absent.json".format(CWD, nhc1.name)
-    expected = json.loads(open(json_file).read())
+    expected = {"attr": {"entriesCount": 0}}
     test_func = partial(
         router_nhrp_json_cmp, nhc1, "show ip nhrp shortcut json", expected
     )