Commit graph

114 commits

Author SHA1 Message Date
Christian Hopps c8e5983d8e tests: fix pylint infra errors
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-04 09:04:46 -04:00
Christian Hopps 4958158787 tests: micronet: update infra
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-04 09:04:46 -04:00
Christian Hopps 4f99894dd0 tests: configure routers in parallel
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-26 20:49:27 -04:00
nguggarigoud cc90defcb6 tests: ospf gr helper topotests with scapy.
Testing ospf gr helper using scapy tool.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-08-23 21:42:09 -07:00
Christian Hopps 6a95bfc8b0 tests: uniq vrf names when using netns
- 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-08-21 06:13:52 -04:00
Christian Hopps 35c4c991f0 tests: reset router configs in parallel
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-03 09:07:49 +00:00
Christian Hopps 269a822be4 tests: dump the actual json values to log
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-03 09:07:49 +00:00
nguggarigoud db56171c86 tests: Adding ospfv3 basic functionality test cases
1. Adding  APIs to configure and verify ospfv3.
2. Adding ospfv3 base functionality testcase.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-07-20 02:34:24 -07:00
Donald Sharp c24e832ae9
Merge pull request #8946 from gpnaveen/bgp_lib_changes
tests: Adding lib changes for bgp peer type verification.
2021-07-16 09:15:36 -04:00
Christian Hopps be4a9b0570 tools: improve frr-reload.py delta file creation
- Remove incorrect requirement for `service integrated-vtysh-config`
  when producing a delta.
- Add `--test-reset` option which suppresses non-parseable lines from the
  produced delta
- Use new features in common_config.py

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-07-15 22:12:01 -04:00
nguggarigoud ad03ea8ebf tests: Adding lib changes for bgp peer type verification.
Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-07-15 05:28:08 -07:00
Russ White 000df71ccd
Merge pull request #8767 from opensourcerouting/ospfd-gr
ospfd: introduce support for Graceful Restart (restarting mode)
2021-07-13 06:39:53 -04:00
Renato Westphal 5957a1a11f tests: add "save_config" parameter to kill_router_daemons()
Using "write memory" to save the daemons' configurations before
restarting them can cause log files to stop working correctly. Add
a new "save_config" to the kill_router_daemons() function to prevent
that from happening when saving the configurations isn't necessary.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-07-05 11:43:02 -03:00
Christian Hopps 0ef5bf1905 tests: generate support bundles in parallel, fix bugs
Speedup (large topo): OLD: ~6 minutes NEW: ~1 second
  (when paired with generate_support_bundle.py changes)
- Collect from each node in parallel

Bug fixes:
- sub-directory test name was the same internal pytest function name
  for any test, and not the actual test name.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-06-30 15:46:10 +00:00
Christian Hopps ed776e38f6
tests: apply KISS to retry fixture
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-25 05:33:04 +00:00
nguggarigoud 2448d00200 tests: Adding ospfv3 basic functionality test cases
1. Adding  APIs to configure and verify ospfv3.
2. Adding ospfv3 base functionality testcase.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-06-15 17:00:17 -07:00
Igor Ryzhov 60070c3d02 tests: remove tcp_l3mdev_accept setting
This is not necessary anymore with fixed `vrf_bind`.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-31 22:12:55 +03:00
nguggarigoud 8694dd78db tests: adding ospf basic 2 testcases.
Test cases included are 1 ospf cost, 1 ospf mtu.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-05-17 19:23:15 -07:00
Donald Sharp ec8f360f2d tests: Remove kill_mininet_router_process
This function kills all processes that happen to have the same
name to frr processes and it was only ever used in the setup.
Setup should not be used to kill old runs.  That should be a
separate process.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-22 15:47:37 -04:00
Donald Sharp 0b25370e95 tests: More black fixups
Just another round of fixups found by running black on the code

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-09 08:35:05 -04:00
Patrick Ruddy fb94a2e65d
Merge pull request #8402 from opensourcerouting/debian10-topotest-fix
tests: fix for l3mdev topotests on kernel 4.19
2021-04-08 14:54:54 +01:00
David Schweizer 3d762f26a6
tests: add l3mdev config helpers for VRF topotests
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2021-04-05 09:25:50 +02:00
Kuldeep Kashyap 2268cf50d5 tests: Fix for BGP_GR test failures
Few tests were failing in BGP-GR intermittently. Fixing the failures.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-04-05 00:15:40 -07:00
Kuldeep Kashyap 53402dbf1e tests: Fix bgp convergence issue mentioned in #8279
1. Enhance verify_bgp_convergence() to solve issue mentioned in #8279

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-03-17 17:43:57 -07:00
Donatas Abraitis 7b94dd35dd
Merge pull request #8195 from qlyoung/fix-community-type-command
tests: fix community-list invalid command
2021-03-07 17:04:57 +02:00
Quentin Young 60e7da0cff tests: fix community-list invalid command
Didn't test this but it's already randomly broken so cant be worse

Hopefully fixes:

raise InvalidCLIError("%s" % output)
InvalidCLIError: line 2: % Command incomplete[4]: bgp
large-community-list standard Test1 permit

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-03-03 13:56:39 -05:00
Wesley Coakley 23f3a92e34
tests: address coverity / styling issues in topotests
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-03-02 20:44:15 -05:00
Mark Stapp e9867ca57b tests: report kernel version check failures
Report kernel version check failures in the test log.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-02-16 11:55:47 -05:00
Mark Stapp 70b99f2fff tests: make generate support bundle python3 only
Make the generate-support-bundle script and interactions more
python3-friendly, and use python3 explicitly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-02-15 08:13:06 -05:00
ckishimo 1f661c8c90 tests: start ospf6d daemon
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-27 17:30:52 +01:00
ckishimo 12011c4015 tests: fix create_router_ospf6 to use ospf6 instead of ospf
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-26 11:19:38 +01:00
ckishimo a7394afa52 tests: create_interfaces_cfg add ospfv3 support
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-26 11:01:05 +01:00
ckishimo 3ee31ad131 tests: create_interfaces_cfg add ospf cost
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-26 10:57:06 +01:00
ckishimo 6e7f58da09 tests: create_interfaces_cfg refactor ospf
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-26 10:52:32 +01:00
Donald Sharp f2aee6967c
Merge pull request #7837 from ckishimo/tests_ospf
tests: fix redistribute key in ospf tests
2021-01-13 13:31:32 -05:00
nguggarigoud 26bbe9af5e tests: Static route cases with admin dist and tag.
1. Adding api to verify ip nht command.
2. 5 cases of static routes with admin dist and tag
3. Run time = 89Secs

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-01-12 17:13:26 +05:30
ckishimo 9458be1aec tests: fix ospf cosmetic output
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-12 11:18:22 +01:00
Donald Sharp 662aa246aa tests: Fix gr_tests
The bgp_gr_functionality_topo1 test was shutting down an
interface on r2 and then trying to bring it up on r1.
Hijinx ensued.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-07 17:30:04 -05:00
Donald Sharp fe035acc87
Merge pull request #7820 from kuldeepkash/topojson_framework
tests: [topojson]Add/Enhance framework to support PIM automation
2021-01-06 08:59:34 -05:00
kuldeepkash aafca66993 tests: [topojson]Enhance lib/common_config.py to support PIM automation
1. Enhanced lib/common_config.py for common configuration/verification needed
   for PIM automation
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2021-01-06 05:08:31 +00:00
ckishimo 90340b2b82 tests: fix typos
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
2021-01-05 20:00:19 +01:00
Mark Stapp d4473065f4
Merge pull request #7759 from qlyoung/reformat-tests-again
Reformat tests again
2020-12-23 08:11:00 -05:00
whitespace 9fa6ec1473 tests: please follow the style guide
thanks

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-12-17 15:32:55 -05:00
nguggarigoud 938d5980d1 tests: Optimised static routing testsuits
1. Removed bgp specific triggers.
2. Removed repeatativ steps.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen 88fedaaa7b tests: Adding static routing topojson automation suites.
Adding API's required for EVPN suite.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
Naveen 03cb898f46 tests: Updated doctstring for start & stop router
Actual path for configs is /tmp/topotest/<suite>/<router>
common_config.py is updated.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
naveen 0705f3120d tests: Adding static routing topojson automation suites.
1. Enhanced framework to
a. Verify fib active routes(lib/common_config.py).
b. Verify bgp multi path routes(lib/bgp.py).
c. Create mininet nodes with different names(lib/topojson.py).

4. 12 Test cases of static routing with ibgp.
Test suite execution time is ~30 minutes.

5. 12 Test cases of static routing with ebgp.
Test suite execution time is ~30 minutes.

Signed-off-by: naveen <nguggarigoud@vmware.com>
2020-12-10 16:44:48 -08:00
Donald Sharp a28055a478 tests: Fix common_config.py issues
1) in generate_ips if start_ipaddr does not have a `/` in it
there exists a code path where both mask and step are
null values.  Write a bit of code to ensure this pre-req
is found early and often

2) in verify_rib there exists a code path where static_route
is null when we get to the non static route section.  Change
the code to operate on the advertise_network_dict that
we are iterating over.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-19 07:40:03 -05:00
Kuldeep Kashyap abb229fde3 tests: Enhance libraries to optimize test execution
1. Enhance libraries to optimize test execution as per Donald's suggestion

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-11-12 11:45:12 +00:00
Donald Sharp 02a17eaddf
Merge pull request #7498 from mjstapp/fix_topo_count_only
tests: only test count of nexthops in bgp max-paths test
2020-11-10 15:17:59 -05:00