Commit 6695e5b098 for frr

commit 6695e5b098a48e9aff07a76b8ba1877622cec1ba
Author: Abdul Wasey <w453y.me@gmail.com>
Date:   Mon Sep 14 07:22:26 2026 +0000

    tests: cover a lifetime edit reaching the data plane

    The suite checked that a key reaches the data plane when it is added. It
    did not check that editing one reaches it, and a lifetime is the edit
    that matters here: it is the field this message exists to carry, and the
    one the key chain was not notifying about.

    Change an accept lifetime on a key the listener already holds and
    require the value it holds to move. Reading the new value back rather
    than a count is what separates this from the case above it, which a
    resend of the old set would also satisfy.

    Signed-off-by: Abdul Wasey <w453y.me@gmail.com>

diff --git a/tests/topotests/bfd_dplane_auth_topo1/test_bfd_dplane_auth_topo1.py b/tests/topotests/bfd_dplane_auth_topo1/test_bfd_dplane_auth_topo1.py
index aa29902e7a..a65909cf16 100644
--- a/tests/topotests/bfd_dplane_auth_topo1/test_bfd_dplane_auth_topo1.py
+++ b/tests/topotests/bfd_dplane_auth_topo1/test_bfd_dplane_auth_topo1.py
@@ -257,6 +257,47 @@ def test_a_new_key_is_pushed():
     )


+def test_a_lifetime_edit_is_pushed():
+    """Changing only a lifetime sends the set again.
+
+    A key string or an algorithm reaches the data plane because changing it
+    notifies the key chain hook. A lifetime is just as much a part of the
+    key, and it is the part this message exists to carry: software BFD
+    re-reads it on every packet, but an offloaded session was handed it
+    once and has nothing to re-read.
+    """
+    _skip_on_failure()
+
+    before = _keys(_listener_dump())
+    assert before, "the listener holds no keys to edit"
+    target = before[0]["id"]
+
+    get_topogen().gears["r1"].vtysh_cmd(
+        """
+        configure terminal
+        key chain rollover
+        key {}
+        accept-lifetime 00:00:00 Jan 1 2020 23:59:59 Dec 31 2037
+        end
+        """.format(target)
+    )
+
+    def _accept_end():
+        for key in _keys(_listener_dump()):
+            if key["id"] == target:
+                return key["accept_end"]
+        return -1
+
+    _, result = topotest.run_and_expect(
+        lambda: _accept_end() != before[0]["accept_end"], True, count=30, wait=1
+    )
+    assert result is True, (
+        "the data plane still holds the old accept lifetime for key {}, {}".format(
+            target, before[0]["accept_end"]
+        )
+    )
+
+
 def test_memory_leak():
     "Run the memory leak test and report results."
     tgen = get_topogen()