Commit f83d941186 for frr

commit f83d9411866b026301fbd590e02571f6598deec3
Author: Rafael Zalamena <rzalamena@opensourcerouting.org>
Date:   Thu Oct 15 18:14:47 2026 -0300

    tests: frr-reload never trims "no vrf NAME"

    A top-level VRF stanza delete, (("vrf NAME",), None), renders as
    "no vrf NAME". The "no" retry must not shorten it to "no vrf", which is
    not a valid command. Also cover the "VRF device still up" rejection,
    which is skipped without a retry and is not a reload failure.

    Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>

diff --git a/tests/topotests/frr_reload_no_form/test_frr_reload_delete_retry.py b/tests/topotests/frr_reload_no_form/test_frr_reload_delete_retry.py
index f9fe8eabf9..6ed661e4c4 100644
--- a/tests/topotests/frr_reload_no_form/test_frr_reload_delete_retry.py
+++ b/tests/topotests/frr_reload_no_form/test_frr_reload_delete_retry.py
@@ -141,3 +141,27 @@ def test_trim_gives_up_at_two_words(reload):
         " no foo",
     ]
     assert all(call[-1] == "exit" for call in calls)
+
+
+def test_vrf_context_delete_not_trimmed(reload):
+    """Never shorten "no vrf NAME" to "no vrf", which is not valid."""
+    ok, calls = _delete(reload, [], ("vrf blue",), None)
+    assert not ok
+    assert calls == [["configure", "no vrf blue"]]
+
+
+def test_vrf_context_delete_active_vrf_skipped(reload):
+    """VRF device still up: not a reload failure, and no trimmed retry."""
+    calls = []
+
+    def vtysh(command, stdouts=None):
+        calls.append(list(command))
+        raise reload.VtyshException(reload.VRF_DELETE_SKIP_ERRS[0])
+
+    logging.disable(logging.CRITICAL)
+    try:
+        ok = reload.delete_line_with_vtysh(vtysh, ("vrf blue",), None)
+    finally:
+        logging.disable(logging.NOTSET)
+    assert ok
+    assert calls == [["configure", "no vrf blue"]]