Commit graph

4335 commits

Author SHA1 Message Date
Donatas Abraitis 0850ae7db7
Merge pull request #18658 from y-bharath14/srib-tests-v12
tests: Resource leak in common_config.py
2025-04-17 18:18:26 +03:00
David Lamparter 336fe6728f
Merge pull request #18662 from mjstapp/fix_test_nb_endian 2025-04-16 10:49:13 +02:00
Mark Stapp b256f2f1e9 tests: add nb test binary to .gitignore
Add a northbound unit-test binary product to .gitignore

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-15 13:16:07 -04:00
Mark Stapp da8fce3830 tests: use little-endian order for libyang api
Use the expected - little-endian - byte-order for a param
to one of the libyang apis; tests fail on LE architectures
otherwise.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-15 13:15:09 -04:00
Y Bharath bb6f2c2fb0 tests: Resource leak in common_config.py
Address pending changes from PR:18574

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-04-15 11:24:44 +05:30
Christopher Dziomba 438360e2bd
tests: Validating staticd v4-over-v6 nexthop
Introducing do_ipv6_nexthop to static_simple topotest. The test
configures IPv4 routes with IPv6 nexthop and validates that via
inet6 is visible in the Linux Kernel

Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
2025-04-14 19:34:11 +02:00
Donald Sharp dbff585b41 tests: Add more tests to bgp_rpki_topo1 test
Looking at the gcov of the rpki code, I noticed
that there was some functionality that is not
covered in our test suites.  Add the functionality.

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2025-04-12 17:00:02 -04:00
Donatas Abraitis 85bb2155db
Merge pull request #18574 from y-bharath14/srib-tests-v10
tests: Shadowing the built-in function
2025-04-11 18:54:01 +03:00
Donald Sharp f34ee05f8b
Merge pull request #18633 from y-bharath14/srib-tests-v11
tests: Fix potential issues in mcast-tester.py
2025-04-11 08:41:02 -04:00
Y Bharath 868796cf69 tests: Fix potential issues in mcast-tester.py
Fix potential issues in mcast-tester.py

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-04-10 17:01:06 +05:30
Soumya Roy 93458dcf7a test: Test for bgp route delete
This fix add tests to verify routes/path are getting
deleted properly, when the advertising neighbor is shutdown

Signed-off-by: Soumya Roy <souroy@nvidia.com>
2025-04-09 20:46:43 +00:00
Mark Stapp e2515f7a4f tests: clean up variable-shadow warnings
Clean up -Wshadow warnings in unit-tests

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Rajasekar Raja dbd9fed0b3 staticd: Avoid requesting SRv6 sid from zebra when loc and sid block dont match
Currently, when the locator block and sid block differs, staticd would
still go ahead and request zebra to allocate the SID which it does if
there is atleast one match (from any locators).

Only when staticd tries to install the route, it sees that the locator
block and sid block are different and avoids installing the route.

Fix:
Check if the locator block and sid block match before even requesting
Zebra to allocate one.

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2025-04-07 10:34:07 -07:00
Y Bharath 920ef44023 tests: Shadowing the built-in function
Shadowing the built-in function

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-04-04 12:25:18 +05:30
Mark Stapp bee5b36bbb
Merge pull request #18572 from opensourcerouting/fix/syntax_error_bgp_gr_notification
tests: Fix typo when configuring delayopen timer
2025-04-03 10:32:05 -04:00
Mark Stapp e0a97e5b85
Merge pull request #18546 from LabNConsulting/ziemba/250330-rfapi-mem-cleanup
bgpd: rfapi: track outstanding rib and import timers, free mem at exit
2025-04-03 09:01:35 -04:00
Russ White ab67e5544e
Merge pull request #18396 from pguibert6WIND/srv6l3vpn_to_bgp_vrf_redistribute
Add BGP redistribution in SRv6 BGP
2025-04-03 08:25:32 -04:00
Donatas Abraitis 55d88ee3de tests: Fix typo when configuring delayopen timer
`"` was accidentally added, and random tests failures happening.

Fixes: a4f61b78dd ("tests: Check if routes are marked as stale and retained with N-bit for GR")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-04-03 14:01:20 +03:00
Donatas Abraitis 112663772a
Merge pull request #18553 from y-bharath14/srib-tests-v9
tests: Resource leaks in test_all_protocol_startup
2025-04-03 11:08:37 +03:00
Russ White c312917988
Merge pull request #18450 from donaldsharp/bgp_packet_reads
Bgp packet reads conversion to a FIFO
2025-04-01 10:12:37 -04:00
Y Bharath 09081f8563 tests: Resource leaks in test_all_protocol_startup
Fix resource leaks in test_all_protocol_startup.py

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-04-01 12:06:15 +05:30
G. Paul Ziemba 1629c05924 bgpd: rfapi: track outstanding rib and import timers, free mem at exit
While here, also make "VPN SAFI clear" test wait for clear result
    (tests/topotests/bgp_rfapi_basic_sanity{,_config2})

    Original RFAPI code relied on the frr timer system to remember
    various allocations that were supposed to be freed at future times
    rather than manage a parallel database. However, if bgpd is terminated
    before the times expire, those pending allocations are marked as
    memory leaks, even though they wouldn't be leaks under normal operation.

    This change adds some hash tables to track these outstanding
    allocations that are associated with pending timers, and uses
    those tables to free the allocations when bgpd exits.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2025-03-31 08:45:33 -07:00
Y Bharath f2d988bf71 tests: Irrelevant code in lutil.py
Irrelevant code in lutil.py

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-03-28 10:52:36 +05:30
Y Bharath 04a73bdf3a tests: Fix potential issues at send_bsr_packet.py
Fix potential issues at send_bsr_packet.py

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-03-27 09:30:40 +05:30
Russ White 565da4d471
Merge pull request #18498 from opensourcerouting/fix/keep_stale_routes_on_clear
bgpd: Retain the routes if we do a clear with N-bit set for Graceful-Restart
2025-03-26 14:02:52 -04:00
Jafar Al-Gharaibeh 75d5312f19
Merge pull request #18508 from donaldsharp/rip_snmp_test_fixup
tests: Modify simple_snmp_test to use frr.conf
2025-03-26 12:38:05 -05:00
Donald Sharp 212a5379b0
Merge pull request #18502 from opensourcerouting/fix/mpls_withdraw_label
bgpd: Set the label for MP_UNREACH_NLRI 0x800000 instead of 0x000000
2025-03-26 11:26:19 -04:00
Donald Sharp e23d2f197c tests: Modify simple_snmp_test to use frr.conf
The simple_snmp_test was not properly testing
the rip snmp code because of weirdness w/ mgmtd
and non-integrated configs.  Modify the whole
test to use a integrated config and voila
ripd is talking snmp again in the test.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-03-26 11:14:57 -04:00
Russ White 73bfe788f0
Merge pull request #18506 from donaldsharp/ripng_test_aggregate_address
tests: Add ripng aggregate address testing
2025-03-26 10:31:59 -04:00
Donatas Abraitis e69459c714 tests: Use label 0x800000 instead of 0x000000 for BMP tests
Related-to: 94e2aadf71 ("bgpd: Set the label for MP_UNREACH_NLRI 0x800000 instead of 0x000000")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-03-26 14:47:44 +02:00
Martin Buck b73e3ae69d tests: Fix wait times in test_ospf6_gr_topo1 topotest
Increase wait times to at least the minimum wait time accepted by
topotest.run_and_expect(). Also change poll interval to 1s, no point in
doings this more frequently.

Finally, slightly improve the topology diagram to also include area numbers.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2025-03-26 10:30:35 +01:00
Donatas Abraitis d19854c5ce
Merge pull request #18476 from y-bharath14/srib-tests-v6
tests: Handling potential errors gracefully
2025-03-26 10:34:23 +02:00
Donald Sharp 0c7cd73a7b tests: Add ripng aggregate address testing
Looking at gcov and noticed that ripngd does not
test any aggregate address addition/deletion
to ensure that it works.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-03-25 17:35:47 -04:00
Donatas Abraitis a4f61b78dd tests: Check if routes are marked as stale and retained with N-bit for GR
Related-to: b7c657d4e0 ("bgpd: Retain the routes if we do a clear with N-bit set for Graceful-Restart")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-03-25 17:40:00 +02:00
Philippe Guibert 171231686d topotests: remove useless frr commands of bgp_srv6l3vpn_to_bgp*
Many useless commande are still persistent in the
bgp_srv6l3vpn_to_bgp_vrf tests. Remove the useless commands.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-03-25 14:37:29 +01:00
Donald Sharp f3790640d3 tests: Expand hold timer to 60 seconds for high_ecmp
The hold timer is 5/20.  At load with a very very
large number of routes, the tests are experiencing
some issues with this.  Let's just give ourselves
some headroom associated with the receiving
of packets

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-03-25 09:10:14 -04:00
Russ White 7afe25744b
Merge pull request #18447 from donaldsharp/bgp_clear_batch
Bgp clear batch
2025-03-24 16:13:49 -04:00
Philippe Guibert 121c2ff1b0 topotests: use json exact test for bgp_srv6l3vpn_to_bgp_vrf3
Add more control on the expected outputs, by using an exact json
comparison.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-03-24 17:39:20 +01:00
Y Bharath 0885d2232c tests: Handling potential errors gracefully
Handling potential errors gracefully at exa-receive.py

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-03-24 17:54:20 +05:30
Donatas Abraitis 927e2a9c81
Merge pull request #18467 from cscarpitta/fix/fix_srv6_static_sids_crash_2
staticd: Fix a crash that occurs when modifying an SRv6 SID
2025-03-24 14:16:37 +02:00
Philippe Guibert 03b57b45c6 topotests: fix invalidate exported vpn prefixes on srv6l3vpn vrf3 setup
When srv6 is disabled due to misconfiguration, exported VPN prefixes
are invalidated, except for the ones that have their nexthop modified
with the 'nexthop vpn export' command. The previous commit also
invalidates those vpn prefixes.

Apply the changes to the test by not considering some prefixes as
selected. Enforce the expected route count.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-03-24 09:17:01 +01:00
Jonathan Voss 11ac6ab650 topotests: extend bgp_srv6_l3vpn_to_bgp_vrf4 test with bgp peers
This test ensures route redistribution across an srv6 VPN network
is well taken into account.

Signed-off-by: Jonathan Voss <jvoss@onvox.net>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-03-24 09:17:01 +01:00
Philippe Guibert 92ba38bde2 topotests: bgp_srv6l3vpn_to_bgp_vrf, add redistribute BGP update in l3vpn
Add a BGP update in CE1 for redistribution. The expectation is that this
BGP update will be leaked to the L3VPN. Reversely, if the locator is
unset, the L3VPN prefix will be invalidated.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-03-24 09:17:01 +01:00
Philippe Guibert 57a03cfc54 topotests: bgp_srv6l3vpn_to_bgp_vrf, change AS values
Use experimental AS values to play the test.
Add BGP peering on CEs, and use the default-originate functionality on
each PE facing CPEs.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-03-24 09:17:01 +01:00
Philippe Guibert 6aeb697e38 topotests: remove useless zebra aspath control in bgp srv6 test
The aspath value has no need to be controlled. Unset the bgp capability
to send aspath information to zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-03-24 09:17:01 +01:00
Philippe Guibert 1160c39093 topotests: move bgp_srv6l3vpn_to_bgp_vrf to unified configuration
Use the unified configuration for bgp_srv6l3vpn_to_bgp_vrf test.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-03-24 09:17:01 +01:00
Donald Sharp 5f375cefd5 tests: high_ecmp creates 2 update groups
The high_ecmp test was creating 2 update groups, where
513 of the neighbors are in 1 and the remaining is in
another.  They should just all be in 1 update group.
Modify the test creation such that interfaces r1-eth514
and r2-eth514 have v4 and v6 addresses.

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2025-03-23 17:48:02 -04:00
Carmine Scarpitta 23403e01a3 tests: Add test case to verify SRv6 SID modify
This commit adds a test case that modifies a SID and verifies that the
RIB is as expected.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-03-23 18:47:35 +01:00
Donatas Abraitis 44c4743e08
Merge pull request #18378 from Tuetuopay/fix-route-map-gateway-ip
bgpd: fix `set evpn gateway-ip ipv[46]` route-map
2025-03-23 12:38:38 +02:00
Donald Sharp efa761d132
Merge pull request #18339 from y-bharath14/srib-tests-v3
tests: Corrected typo at path_attributes.py
2025-03-22 19:53:53 -04:00