summaryrefslogtreecommitdiff
path: root/tests/topotests/ospf_basic_functionality
AgeCommit message (Collapse)Author
2024-06-17tests: Avoid importing unused modulesY Bharath
Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2024-05-29Merge pull request #15082 from louis-6wind/fix-iff-lower-upIgor Ryzhov
lib: take into account the Linux IFF_LOWER_UP flag
2024-04-27tests: Apply black formatting for all tests/topotestsDonatas Abraitis
It's just annoying when the linter tells to apply the formatting for the code you didn't touch. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-26topotests: add lower_up to expected interface flagsLouis Scalbert
Add lower_up to expected interface flags. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-04-01tests: teste_ospf_rte_calc.py uses bgp add pytest markDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-09-16[ospfd]: add support for RFC 5709 HMAC-SHA AuthMahdi Varasteh
This patch includes: * Implementation of RFC 5709 support in OSPF. Using openssl library and FRR key-chain, one can use SHA1, SHA256, SHA384, SHA512 and keyed-MD5( backward compatibility with RFC 2328) HMAC algs. * Updating documentation of OSPF * add topotests for new HMAC algorithms Signed-off-by: Mahdi Varasteh <varasteh@amnesh.ir>
2023-05-22ospfd: OSPF P2MP Delayed Reflooding configurationAcee
Currently, delayed reflooding on P2MP interfaces for LSAs received from neighbors on the interface is unconditionally (see commit c706f0e32ba8aa8780a0618b6fbba364c383ae05). In some cases, this change wasn't desirable and this feature makes delayed reflooding configurable for P2MP interfaces via the CLI command: "ip ospf network point-to-multipoint delay-reflood" in interface submode. Signed-off-by: Acee <aceelindem@gmail.com>
2023-05-17tests: Clean up commands that do nothingDonald Sharp
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 <sharpd@nvidia.com>
2023-05-11tests: reset neighbor state machine to avoid bad/stale stateJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2023-05-10tests: log the router id in ospf tests, improve log in a couple of placesJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2023-04-25tests: Run black on test_ospf_lan.pyDonald Sharp
frrbot unhappy. Let's bring a smile to it's life. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-04-25tests: Increase the dead interval to be longer for neighbor testingDonald Sharp
the ospf_basic_functionality/test_ospf_lan.py script is setting up a lan env that will have 4 ospf routers on it and shutting/no shutting interfaces with various priorities to see that ospf is properly choosing roles. I am consistently seeing the ospf_basic_functionality/test_ospf_lan.py script failing where it is saying a neighbor is not in the correct state. Upon examination of the logs we are seeing this: 2023/04/24 09:16:42 OSPF: [M7Q4P-46WDR] vty[7]@(config)# interface r0-s1-eth0 <----- This is where we no shut the interface 2023/04/24 09:16:47 OSPF: [M7Q4P-46WDR] vty[7]@> enable 2023/04/24 09:16:47 OSPF: [M7Q4P-46WDR] vty[7]@# show ip ospf neighbor all json 2023/04/24 09:16:53 OSPF: [QH9AB-Y4XMZ][EC 100663314] STARVATION: task ospf_ism_event (556af08a5b4c) ran for 6038ms (cpu time 0ms) 2023/04/24 09:16:53 OSPF: [HKQ2F-8D0MY][EC 100663315] Thread Starvation: {(thread *)0x556af19da020 arg=0x556af19c0dd0 timer r=-5.086 ospf_ase_calculate_timer() &ospf->t_ase_calc from ospfd/ospf_ase.c:635} was scheduled to pop greater than 4s ago 2023/04/24 09:16:53 OSPF: [M7Q4P-46WDR] vty[18]@> enable 2023/04/24 09:16:53 OSPF: [M7Q4P-46WDR] vty[18]@# show ip ospf neighbor all 2023/04/24 09:16:55 OSPF: [M7Q4P-46WDR] vty[7]@> enable 2023/04/24 09:16:55 OSPF: [M7Q4P-46WDR] vty[7]@# show ip ospf neighbor all json 2023/04/24 09:16:55 OSPF: [M7Q4P-46WDR] vty[7]@> enable This test is setting the dead interval to 4 seconds, seeing a 6 second delay where the os has gone to town (probably because of the high load on the system ) and not choosing the correct neighbor as the DR. OSPF when coming up and after seeing the first neighbor, goes into a waiting period before the DR is elected. If the neighbor does send it's hello packets but they are not processed before the wait timer pops because of the starvation event, then the wrong neighbor will be elected DR. Let's give this test a bit more time to decide who the DR is in case everything goes a bit south. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-04-07tests: replace deprecated ospf json keysMark Stapp
Replace many deprecated json keys in topotests after removing those keys from ospfd. Signed-off-by: Mark Stapp <mjs@labn.net>
2023-03-29Merge pull request #12645 from gpnaveen/ospf_error_msg_enhancementsRuss White
tests: [topojson] Update assert/error messages for ospf scripts
2023-03-26tests: [topojson] Update assert/error messagesnguggarigoud
Few assert/error messages are updated for test scripts for better debugging. Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2023-02-21Merge pull request #12366 from manojvn/ospfv2-flood-reductionRuss White
ospfd: Support OSPF Refresh and Flooding Reduction RFC4136.
2023-02-13tests: Added ospfv2 flood reduction topotest changes.Manoj Naragund
Have added topotest to verify below scenarios. 1. Verify OSPF Flood reduction functionality with ospf enabled on process level. 2. Verify OSPF Flood reduction functionality with ospf enabled on area level. 3. Verify OSPF Flood reduction functionality between different area's Have sussessfully tested these in my local setup Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-01Merge pull request #12713 from opensourcerouting/fix/json_naming_deprecationDonald Sharp
*: Drop deprecated incorrect JSON fields with wrong naming
2023-01-31tests: Use JSON camelCase naming for testsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-01-31tests: Fix wrong tgen.stop_topology() calls which got skippedMartin Winter
Calls were missing the () and caused the stop_topology() to be skipped Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2022-12-13tests: Cleaning up daemon param used in start_topology()Kuldeep Kashyap
Earlier daemon parameter was passed to start_topology(), which is not needed now, as new code is implemented to start feature specific daemons. Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-12-13tests: Topotests daemon start as per feature testKuldeep Kashyap
Currently topotests starts all daemons by default, made changes to f/w so only needed daemons can be started, daemons which are needed to tests particular test suite. Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-10-25topotests: test_ospf_p2mp.py - check for full adjacencies and basic DB infoLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2022-06-21tests: Removing invalid step from ospf tests.nguggarigoud
1. Removed the step from hello test case with hello timer of 65535. This test works in some platforms and does not work in others, affecting stability. Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2022-04-01tests: Fix spelling of daemonsDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-01-22ospfd: topotest cases for LSID change algorgirada
Description: Topotest cases for LSID change (RFC 2328 appendex-E) algorithm. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2021-12-11tests: test_ospf_lan.py is looking for a certain order enforce itDonald Sharp
OSPF when converging will choose a DR / Backup DR based upon who has already come up. Irrelevant of priority. As such if under system load OSPF comes up first and elects a DR that under normal circumstances not be the elected one due to priority OSPF does not go back through and re-elect to keep the system stable in this case. Tests are experiencing this: unet> r0 show ip ospf neigh Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL 100.1.1.1 99 Full/Backup 4m14s 3.780s 10.0.1.2 r0-s1-eth0:10.0.1.1 0 0 0 100.1.1.2 0 Full/DROther 4m14s 3.848s 10.0.1.3 r0-s1-eth0:10.0.1.1 0 0 0 100.1.1.3 0 Full/DROther 4m14s 3.912s 10.0.1.4 r0-s1-eth0:10.0.1.1 0 0 0 unet> r1 show ip ospf neigh Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL 100.1.1.0 98 Full/DR 4m15s 3.011s 10.0.1.1 r1-s1-eth1:10.0.1.2 0 0 0 100.1.1.2 0 Full/DROther 4m19s 3.124s 10.0.1.3 r1-s1-eth1:10.0.1.2 0 0 0 100.1.1.3 0 Full/DROther 4m19s 3.188s 10.0.1.4 r1-s1-eth1:10.0.1.2 0 0 0 unet> r2 show ip ospf neigh Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL 100.1.1.0 98 Full/DR 4m27s 3.483s 10.0.1.1 r2-s1-eth0:10.0.1.3 0 0 0 100.1.1.1 99 Full/Backup 4m32s 3.527s 10.0.1.2 r2-s1-eth0:10.0.1.3 0 0 0 100.1.1.3 0 2-Way/DROther 4m32s 3.660s 10.0.1.4 r2-s1-eth0:10.0.1.3 0 0 0 unet> r3 show ip ospf neigh Neighbor ID Pri State Up Time Dead Time Address Interface RXmtL RqstL DBsmL 100.1.1.0 98 Full/DR 4m55s 3.786s 10.0.1.1 r3-s1-eth1:10.0.1.4 0 0 0 100.1.1.1 99 Full/Backup 4m55s 3.829s 10.0.1.2 r3-s1-eth1:10.0.1.4 0 0 0 100.1.1.2 0 2-Way/DROther 4m54s 3.897s 10.0.1.3 r3-s1-eth1:10.0.1.4 0 0 0 Modify the test to do a clear to enforce the order we are specifically looking for. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-24tests: Do not pick an ip address that overlaps with ourselvesDonald Sharp
The ospf_basic_functionality/test_ospf_lan.py creates a ethernet segment and attaches 4 routers to it and assigns ip addresses in a /24. As one of the tests it picks a new address for r0 which coincides with a ip address on r3. Then the test immediatly checks for other data. The problem is of course that if a test is `slow` enough hello's will start to be ignored from r3 to r0 and the neighbor relationships will come down. Choose an ip address that doesn't cause this issue. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-15tests: Fix ospf_asbr_summary_topo1.pyDonald Sharp
This script is failing occassionally in our upstream topotests. Where it was changing route-maps and attempting to see if summarization was working correctly. The problem was that the code appeared to be attempting to add route-maps to redistribution in ospf then modifying the route-maps behavior to affect summarization as well as the metric type of that summarization. The problem is of course that ospf does not appear to modify the summary routes metric-type when the components of that summary change it's metric-type. So the test is testing nothing. In addition the test had messed up the usage of the route-map generation code and all the generated config was in different sequence numbers but route-map processing would never get to those new sequence numbers because of how route-maps are processed. Let's just remove this part of the test instead of trying to unwind it into anything meaningfull Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-04tests: cleanup: rerun changed files through blackChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-04tests: cleanup - remove unused importsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-04tests: remove legacy Topo class (fixes many pylint errors)Christian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-04tests: fix pylint test errorsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-04tests: micronet: adapt testsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-27tests: fix ospf ASBR summary testChristian Hopps
Previously the check did nothing as the input_dict parameter was wrong. Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-24Merge pull request #8729 from gpnaveen/ospf_route_mapsRuss White
tests: ospf routemap basic test cases 2.
2021-08-23tests: use correct key for deleting entry.Christian Hopps
OSPF mixes uses of "delete" and "del_action" depending on which library function is called. It's a bug-prone mess that needs fixing; however, for now we fix the one obvious incorrect use in this test. Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-23tests: ospf routemap basic test cases 2.nguggarigoud
Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-08-21tests: uniq vrf names when using netnsChristian Hopps
- In order to run tests in parallel the netns-based vrfs need to have unique names primarily bc they are all tracked/looked-up in `/run/netns` which is not network namespace nesting friendly - use ip(8) exclusively rather than a mix of `ip` and `ifconfig` and `vconfig`, reducing required pkg count by a couple. Signed-off-by: Christian Hopps <chopps@labn.net>
2021-07-28tests: Add pytest.mark.ospfd on tests missing this markDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-06-25tests: apply KISS to retry fixtureChristian Hopps
This python fixture was way too complex for what is needed. Eliminate gratuitous options/over-engineering: - Change from non-deterministic `wait` and `attempts` to a single `retry_timeout` value. This is both more deterministic, as well as what the user should actually be thinking about. - Use a fixed 2 second pause between executing the wrapped function rather than a bunch of arbitrary choices of 2, 3 and 4 seconds spread all over the test code. - Get rid of the multiple variables for determining what "Positive" and "Negative" results are. Instead just implement what all the user code already wants, i.e., boolean False or a str (errormsg) means "Negative" result otherwise it's a "Positive" result. - As part of the above the inversion logic is much more comprehensible in the fixture code (and more correct to boot). Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-23tests: Adding ospfv2 summarisation test cases.nguggarigoud
Total cases 6. Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-06-08Merge pull request #7096 from gpnaveen/ospf_asbr_summarisationOlivier Dugeon
tests : Adding 2 ospf asbr summary testcases.
2021-05-17tests : Adding 2 ospf asbr summary testcases.nguggarigoud
Test suite execution time is ~1 minutes. Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-05-17tests: adding ospf basic 2 testcases.nguggarigoud
Test cases included are 1 ospf cost, 1 ospf mtu. Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-04-09tests: More black fixupsDonald Sharp
Just another round of fixups found by running black on the code Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-06tests: Improve error/assert message loggingKuldeep Kashyap
1. Improved error meesage logging. 2. No functionality changes only put some meaningfull error messages. Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-03-01tests: Run `black` against tests again to clean up formattingDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-02-04tests: Add pytest.mark.staticd to topotestsDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>