summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-10-14 16:04:30 +0200
committerChristian Breunig <christian@breunig.cc>2024-12-16 22:21:36 +0100
commit43ec27e6340779706dff0c6cbd601296c532d535 (patch)
treeef4636e7fe350b238e1a753993203e4ea119f9d4 /smoketest
parent8b21fb0aecf46b6da4bac091d380d3c4927100bd (diff)
downloadvyos-1x-43ec27e6340779706dff0c6cbd601296c532d535.tar.gz
vyos-1x-43ec27e6340779706dff0c6cbd601296c532d535.zip
ospf: T6747: fix deferred shutdown handling
Honor ospfd deferred shutdown when "max-metric router-lsa on-shutdown" is defined. https://github.com/FRRouting/frr/issues/17011
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_ospf.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py
index 5da352300..24cc24da4 100755
--- a/smoketest/scripts/cli/test_protocols_ospf.py
+++ b/smoketest/scripts/cli/test_protocols_ospf.py
@@ -15,8 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import unittest
-import time
+from time import sleep
from base_vyostest_shim import VyOSUnitTestSHIM
from vyos.configsession import ConfigSessionError
@@ -226,6 +226,13 @@ class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase):
frrconfig = self.getFRRconfig('router ospf', daemon=PROCESS_NAME)
self.assertIn(f' distance ospf intra-area {intra_area} inter-area {inter_area} external {external}', frrconfig)
+ # https://github.com/FRRouting/frr/issues/17011
+ # We need to wait on_shutdown time, until the OSPF process is removed from the CLI
+ # otherwise the test in tearDown() will fail
+ self.cli_delete(base_path)
+ self.cli_commit()
+
+ sleep(int(on_shutdown) + 5) # additional grace period of 5 seconds
def test_ospf_06_neighbor(self):
priority = '10'
@@ -572,7 +579,7 @@ class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase):
print(f"Attempt {retry_count}: FRR config is still empty. Retrying...")
retry_count += 1
- time.sleep(1)
+ sleep(1)
frrconfig = self.getFRRconfig('router ospf', daemon=PROCESS_NAME)
if not frrconfig: