From e396a4f0c66521ea87b4a3e4cacef81e3cf8fcb8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 16 May 2023 16:46:35 -0400 Subject: [PATCH] tests: Clean up commands that do nothing Recently clear commands were added to the tests that do nothing because they are using the wrong way to input the command. Since these do nothing remove them: 2023-05-16 16:39:07,072.072 DEBUG: topolog.r0: Router(r0): cmd_status("['/bin/bash', '-c', 'clear ip ospf neighbor']", pre_cmd: "['/usr/bin/nsenter', '--mount=/proc/4157893/ns/mnt', '--net=/proc/4157893/ns/net', '--uts=/proc/4157893/ns/uts', '-F', '--wd=/tmp/topotests/ospf_basic_functionality.test_ospf_asbr_summary_topo1/r0']" use_pty: False kwargs: {'stdout': -1, 'stderr': -2, 'encoding': 'utf-8', 'shell': False, 'stdin': None, 'env': {'LANG': 'en_US.UTF-8', 'LS_COLO) 2023-05-16 16:39:07,120.120 WARNING: topolog.r0: Router(r0): proc failed: rc 1 pid 4161077 args: /usr/bin/nsenter --mount=/proc/4157893/ns/mnt --net=/proc/4157893/ns/net --uts=/proc/4157893/ns/uts -F --wd=/tmp/topotests/ospf_basic_functionality.test_ospf_asbr_summary_topo1/r0 /bin/bash -c clear ip ospf neighbor stdout: Usage: clear [options] Options: -T TERM use this instead of $TERM -V print curses-version -x do not try to clear scrollback stderr: *empty* Signed-off-by: Donald Sharp --- .../ospf_basic_functionality/test_ospf_asbr_summary_topo1.py | 4 ---- .../test_ospfv3_asbr_summary_topo1.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py b/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py index cf7d95b65a..0531e81d44 100644 --- a/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py +++ b/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py @@ -1579,10 +1579,6 @@ def test_ospf_type5_summary_tc45_p0(request): result = create_interfaces_cfg(tgen, input_dict) assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result) - # clear neighbor state on both routers to avoid stale state - tgen.net["r0"].cmd("clear ip ospf neighbor") - tgen.net["r1"].cmd("clear ip ospf neighbor") - ospf_covergence = verify_ospf_neighbor(tgen, topo) assert ospf_covergence is True, "setup_module :Failed \n Error {}".format( ospf_covergence diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py index 8cc0ed6090..49c25ab8f6 100644 --- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py +++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py @@ -1428,10 +1428,6 @@ def ospfv3_type5_summary_tc45_p0(request): result = create_interfaces_cfg(tgen, input_dict) assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result) - # restart interface state machine on both routers to avoid stale state - tgen.net["r0"].cmd("clear ipv6 ospf6 interface") - tgen.net["r1"].cmd("clear ipv6 ospf6 interface") - ospf_covergence = verify_ospf6_neighbor(tgen, topo) assert ospf_covergence is True, "Testcase {} :Failed \n Error: {}".format( tc_name, ospf_covergence