Commit graph

44 commits

Author SHA1 Message Date
Nathan Bahr 13c0722b5c tests: PIM AutoRP tests expanded
Now with a full AutoRP implementation, we can test AutoRP in a full network setup
beginning with candidate RP announcements all the way through discovery and active RP
selection.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-11-19 22:33:11 +00:00
Nathan Bahr dff1db9ef6 tests: Addition of AutoRP Discovery uncovered broken PIM test
With AutoRP discovery running by default, that adds a new
IGMP group that needs to be accounted for in IGMP output.

For pim.py
  The clear IGMP interfaces function is in a broken state. It was
  already ignoring any errors and returned true always, but with
  the addition of the AutoRP discovery group, you could end up
  with a different group order in the json which would cause a key
  error making the test fail. For now I just added a check to
  avoid the key error.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-09-24 16:40:57 +00:00
Nathan Bahr af45a16fce tests: Added tests for new AutoRP functionality
Uses hardcoded sample AutoRP packets injected in to test
message parsing and proper application of AutoRP learned
RP info. Tests mix of AutoRP and static RP's.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-09-24 16:40:55 +00:00
Barry A. Trent 1425d4ac48 tests: add topotest for igmp proxy
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-23 11:43:40 -07:00
Jafar Al-Gharaibeh 571108e0e1 tests: don't set oif to a list if it is None
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-09 17:14:16 -05:00
Nathan Bahr 7ce2a1b8fb tests: Added new topotest for pim igmp static groups
Copied the existing "join-group" test and modified to test
static groups instead. Functionally the same but without IGMP
reports.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-08-15 17:10:32 +00:00
Y Bharath 8381dbd9e2 tests: Avoid importing unused modules
Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2024-06-17 15:42:59 +05:30
Kuldeep Kashyap 3066746f5f tests: Update join state in verify_upstream_iif API
When JoinState is not passed to API it is expected to
be in Joined state, there was a minor bug in API, where
it was printng JoinState as None, which is default value
in API. Updated value to print Joined when verification
fails.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-07-19 19:21:01 +05:30
Christian Hopps efedb18976 tests: fixing pim6 topotest bugs
- Remove use of bespoke socat
- Use ipv6 support in mcast-tester.py
- do not run processes in the background behind munet/micronet's
  back with `&` (ever) -- use popen or the helper class

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-08 04:55:32 -04:00
Christian Hopps fea00bad20 tests: fix pylint error, and update style in lib/*.py
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-17 13:42:32 -04:00
Abhishek N R 9bcf8c9476 tests: [PIMv6] F/W support for multicast mld local join automation
Enhanced or added new libraries to support
multicast mld local join  automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
Co-Auther: Vijay Kumar Gupta <vijayg@vmware.com>
2023-04-03 04:05:26 -07:00
Kuldeep Kashyap 54bf02c6dd tests: [PIMv6] F/W support for multicast pimv6 automation
Enhanced or added new libraries to support
multicast pimv6 automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
Co-Auther: Vijay Kumar Gupta <vijayg@vmware.com>
2023-03-06 05:08:08 -08:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
Donatas Abraitis f932966b02 tests: Use JSON camelCase naming for tests
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-01-31 20:49:44 +02:00
Donald Sharp d7b0c7a577
Merge pull request #12350 from kuldeepkash/pim6_fixes
tests: Fix for multicast_pim6_static_rp tests failure
2023-01-19 13:27:32 -05:00
Kuldeep Kashyap 2583746108 tests: fix for test_pim6_multiple_groups_different_RP_address_p2 failure
Testcase: test_pim6_multiple_groups_different_RP_address_p2
was failing because of a bug in framework, Fixed the
bug in this commit.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-01-19 05:26:37 -08:00
Kuldeep Kashyap 244f2df015 tests: Fix for frr-bot style issues
Fixed style issues repoted by frr-bot

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-01-17 14:07:23 +05:30
Kuldeep Kashyap db726bb8b7 tests: [topojson]Update assert/error messages
Few assert/error messages are updated for test
scripts for better debugging.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-01-17 14:00:49 +05:30
Kuldeep Kashyap d7032129b0 tests: [PIMv6] F/W support for multicast pimv6 automation
Enhanced or added new libraries to support
multicast pimv6 automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-11-07 02:19:15 -08:00
Kuldeep Kashyap e13f9c4f31 tests: [PIMv6] APIs for multicast PIMv6 config
Enhanced few exsiting PIM APIs to support both
IPv4 and IPv6 configuration. Added few new APIs
for PIMv6. Tested all existing tests with new
API changes.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-07-23 21:28:35 -07:00
Donatas Abraitis 70292e9bbf
Merge pull request #11351 from kuldeepkash/uplink_mcast_tests
tests: Add multicast-pim-multi-uplink test suite
2022-06-21 18:37:40 +03:00
Kuldeep Kashyap 697ce62f7a tests: Verify PIM neighbor and static routes for BSM tests
Verifying and making sure PIM neighbors are
up before sending BSM packet using Scapy.

Verifying static routes are installed before
proceeding fruther.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-06-14 14:23:09 -07:00
Kuldeep Kashyap e46ce55e22 tests: Add framework support for multicast-pim-multi-uplink automation
Added framework support to create and verify multicast
PIM multi-uplink topology and confiuration

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-06-14 02:26:08 -07:00
Kuldeep Kashyap 58cfbb272d tests: Fix for test_pim_dr_nondr_with_ospf_topo2 test failure
This test is failing intermittently because sometimes igmp
local join is not getting deleted. I did split the joins means
trying to delete igmp local joins one by one. I tried running
tests multiple times and it seems to be working fine with
current changes.

There was an issue found during debugging this test failure,
which was raised already:
Issue# https://github.com/FRRouting/frr/issues/11105

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-05-16 03:28:02 -07:00
sarita patra c28e6ef53c tests: Inroduced pim passive test cases
Co-authored-by: Vijay Kumar Gupta <vijayg@vmware.com>
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:22 -07:00
Kuldeep Kashyap 4fafd29f0f tests: [PIMv6] Using generic names for pim verification APIs
1. Modified pim APIs name to generic one, same APIs would be used for PIMv4 and PIMv6
verifications
2. Modified all affacted scripts and ran multiple times locally to avoid CI failures

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-04-30 10:57:31 +05:30
Donald Sharp de3d6b4db4 tests: Reduce some pim test timings to more manageable levels
a) Remove the retry mechanism to continue looking for 75%
of the time for pim code.

   This alone saves a bunch of time in tests that use lib/pim.py
   Effectively all the times given for retry are already long
   enough.  Additionally some tests are gathering data with
   the expectation that they will not find data so the entire
   time is being taken up in retry's.  Extending the retry
   mechanism makes this even worse.  This is especially bad
   for pim in that keep alive timers are counting down and
   state can be removed due to excessive time waiting.

b) Reduce verify verify_multicast_traffic from 40 seconds
to 20 seconds to gather traffic data.

   A bunch of tests are doing this:
   a) gather pre test start traffic data( taking about 70
   seconds to run, because a bunch of time it was looking
   for data that does not exist yet)
   b) run a change to introduce a different traffic flow
   c) gather post test traffic data ( taking about 70
   seconds to run )

   Why does this matter?  Tests were iterating through
   all the different routers looking for traffic flow
   as well as different mroute state.  This is against
   the keepalive timer of 210 seconds.  It does not take
   long before the stream can be removed and the test is
   still looking for data that is no longer there due
   to state timeout.

   The multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py
   test reduced run time from 398 seconds to 297 seconds.
   Greatly reducing keepalive timeout problems.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-01 09:01:38 -04:00
Donald Sharp 0b01a0bbc4 tests: Rename poorly named function
verify_pim_interface_traffic *fetches* the pim
traffic data.  Rename the function to what it
actually does

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-01-07 11:03:15 -05:00
Donald Sharp 3d7d6e9ada tests: Allow interface statistics to be gathered with some delay
Currently under system load tests that use verify_pim_interface_traffic
immediately after a interface down/up event are not giving any time
for pim to receive and process the data from that event.  Give
the test some time to gather this data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-11-29 12:11:43 -05:00
Mark Stapp 94e8feaa9f tests: fix string comparison in lib/pim.py
Use correct string comparison syntax in lib/pim.py

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2021-09-29 11:49:43 -04:00
Christian Hopps a53c08bc13 tests: cleanup: rerun changed files through black
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-04 09:04:47 -04:00
Christian Hopps 4953ca977f tests: cleanup - remove unused imports
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-04 09:04:47 -04:00
Christian Hopps a5124c49d3 tests: add helper object for mcast-tester and iperf tool.
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-04 09:04:47 -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
Christian Hopps 0a76e764c8 tests: Add global pim join-prune-interval json config option
- cleanup pim configuration code

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-19 00:28:35 -04: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
Kuldeep Kashyap 3c41ebf8ea tests: Fixing common pylint error for topojson
Issue: There was an error reported by Pylint regarding "expected" keyword:
   Unexpected keyword argument 'expected' in function call (unexpected-keyword-arg)
Fix: We have defined expected keyword in all topojson APIs.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-06-07 22:23:34 -07:00
Quentin Young 660c59ed6f tests: fix use of undefined variable in pim lib
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-07 13:31:27 -04:00
Quentin Young 5aab262b74 tests: fix improper format strings in pim lib
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-07 13:31:27 -04:00
Quentin Young 8ab4625666 tests: remove duplicate pim test function
Twice defined

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-07 13:31:27 -04:00
Donald Sharp 5980ad0ae0 tests: Run black against tests again to clean up formatting
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-01 09:18:49 -05:00
kuldeepkash eab72dc8e0 tests: Add/enhance framework for multicast-pim-sm automation
1. Add/enhance framework for multicast-pim-sm automation

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2021-01-18 20:09:07 +00:00
kuldeepkash e8cd26fdc5 tests: [topojson]Add lib/pim.py to support PIM automation
1. Added lib/pim.py for PIM configuration/verification
2. Ran it through (black) for expected formatting

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
2021-01-06 05:05:30 +00:00