Commit Graph

2506 Commits

Author SHA1 Message Date
Donatas Abraitis
b6754b74ef
Merge pull request #11643 from ARShreenidhi/df_or_ntw_auto
tests: bgp default orignate behaviour on network commands
2022-07-20 11:43:10 +03:00
Donald Sharp
6ceca15dd1 tests: Make bgp_snmp_mplsl3vpn be more forgiving
I rarely get this failure:
@classname: bgp_snmp_mplsl3vpn.test_bgp_snmp_mplsvpn
@name: test_pe1_converge_evpn
@time: 44.875
@message: AssertionError: BGP SNMP does not seem to be running
assert False
 +  where False = <bound method SnmpTester.test_oid of <lib.snmptest.SnmpTester object at 0x7fa8562eb4f0>>('bgpVersion', '10')
 +    where <bound method SnmpTester.test_oid of <lib.snmptest.SnmpTester object at 0x7fa8562eb4f0>> = <lib.snmptest.SnmpTester object at 0x7fa8562eb4f0>.test_oid
        "Wait for protocol convergence"
        tgen = get_topogen()

        r1 = tgen.gears["r1"]
        r1_snmp = SnmpTester(r1, "10.1.1.1", "public", "2c")

        assertmsg = "BGP SNMP does not seem to be running"
>       assert r1_snmp.test_oid("bgpVersion", "10"), assertmsg
E       AssertionError: BGP SNMP does not seem to be running
E       assert False
E        +  where False = <bound method SnmpTester.test_oid of <lib.snmptest.SnmpTester object at 0x7fa8562eb4f0>>('bgpVersion', '10')
E        +    where <bound method SnmpTester.test_oid of <lib.snmptest.SnmpTester object at 0x7fa8562eb4f0>> = <lib.snmptest.SnmpTester object at 0x7fa8562eb4f0>.test_oid

Under heavy system load a quick test before BGP can fully come up can result in a failed
test.  Add some extra time for snmp to come up properly.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-19 13:54:10 -04:00
ARShreenidhi
27d78d31e7 tests: bgp default orignate behaviour on network commands
test script covers
1. Default originate behaviour using  'network <x.x.x.x>' command
2. Default originate behaviour using aggregate summary command

Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
2022-07-19 13:25:13 +00:00
Donald Sharp
26b2fbf479
Merge pull request #11605 from LabNConsulting/improve-valgrind
Improve valgrind
2022-07-16 21:13:54 -04:00
Jafar Al-Gharaibeh
f8ac2afb53
Merge pull request #11564 from kuldeepkash/multicast_pim_bsm
tests: Fix multicast_pim_bsm_topo2 static route issue
2022-07-15 16:01:13 -05:00
Christian Hopps
160910ec08 tests: analyze: handle list of strings being returned
Signed-off-by: Christian Hopps <chopps@labn.net>
2022-07-14 13:16:01 -04:00
Christian Hopps
1623dc4c9c tests: check memleaks end of module and ignore daemonizing parent
- ignore parent from daemonize valgrind files these allocations will be
checked in the child.
- check for memleaks at end of module/file not just after tests.

Signed-off-by: Christian Hopps <chopps@labn.net>
2022-07-14 13:16:01 -04:00
Chromico Rek
3aaf96aafb topotests: Remove typo on IP
Signed-off-by: Nathan Mangar <nathan@thundergear.io>

topotests: Remove static route

Signed-off-by: Nathan Mangar <nathan@thundergear.io>
2022-07-14 19:07:48 +04:00
David Lamparter
8cb56fb273
Merge pull request #11285 from iqras23/conditional_def_orig 2022-07-12 17:41:09 +02:00
Kuldeep Kashyap
a7bccdc582 tests: Fix multicast_pim_bsm_topo2 static route issue
API to verify static route was checking whether
router is installed with expected nexthop. In
this particular scenario we has same route as
Connected and Static both. In heavy loaded
system static routes was taking time to get
installed and API was doing the verification
on Connected route instead Static route.
Enhanced scripts to check only static routes.

Issue: https://github.com/FRRouting/frr/issues/11563

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-07-10 22:18:50 -07:00
Donatas Abraitis
790b48b635 Revert "topotests: isis-tilfa add a switchover test after linkdown"
This reverts commit bac0d1e606.
2022-07-10 21:40:55 +03:00
Donatas Abraitis
bbd3d821dd Revert "topotests: isis-tilfa add a switchover test after BFD down"
This reverts commit e83a52698b.
2022-07-10 21:40:49 +03:00
Donatas Abraitis
fbf0fc22f0 Revert "isisd: fix metric calculation of classic lfa backup prefixes"
This reverts commit e45958e9cf.
2022-07-10 21:40:43 +03:00
Donatas Abraitis
82f4ef9c90 Revert "topotests: isis-lfa add a switchover test after linkdown"
This reverts commit 5558ac984f.
2022-07-10 21:40:16 +03:00
Donatas Abraitis
378b4a5b06 Revert "topotests: isis-lfa add a switchover test after hello timeout"
This reverts commit c99ef48962.
2022-07-10 21:40:11 +03:00
Donatas Abraitis
567534e93c Revert "topotests: isis-lfa add a switchover test after neighbor clear"
This reverts commit 9cdc099bb5.
2022-07-10 21:40:05 +03:00
Donatas Abraitis
e0d6dad2fb Revert "topotests: isis-lfa add a switchover test after BFD down"
This reverts commit c8d2816ee5.
2022-07-10 21:39:59 +03:00
Russ White
36153aa328
Merge pull request #10962 from louis-6wind/lfa-netlink
isisd: apply fast-reroute as soon an interface or an adjacency falls down
2022-07-08 11:14:07 -04:00
Donatas Abraitis
967e4a1787
Merge pull request #11530 from ARShreenidhi/default_originate_testcase
tests : bgp default originate test cases
2022-07-07 10:11:45 +03:00
ARShreenidhi
fbad2f3af9 tests : Topotest support to bgp_default_originate
When there is change in route-map policy associated with default-originate, changes does not reflect.
When route-map associated with default-originate is deleted, default route doesn't get withdrawn
Update message is not being sent when only route-map is removed from the default-originate config.
SNT counter gets incremented on change of every policy associated with default-originate
Route-map with multiple match clauses causes inconsistencies with default-originate.
Default-originate behaviour on BGP-attributes

Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
2022-07-06 11:06:54 -07:00
Donald Sharp
e894ef7e77
Merge pull request #11524 from kuldeepkash/multicast_pim_bsm
tests: Fix for multicast_pim_bsm_topo1 key error
2022-07-05 19:53:30 -04:00
Pushpasis Sarkar
96929d759f
Merge pull request #11519 from opensourcerouting/feature/turn_on_reserved_ip_ranges
Allow using IPv4 (Class E) IP ranges for daemons
2022-07-05 20:57:37 +05:30
Russ White
211f1157ee
Merge pull request #11494 from ak503/ospf_bfd
ospfd: set/unset bfd profile
2022-07-05 09:51:28 -04:00
Russ White
ede13e3b9c
Merge pull request #11517 from louis-6wind/advert-map
topostest: bgp_conditional_advertisement cleanup
2022-07-05 09:37:41 -04:00
ARShreenidhi
6f5aea0eb6 tests : bgp default originate testcases
this commit containes 2 testcases that covers
1. Default originate behaviour on restarting the BGP daemon and FRR router
2. Default Originate behaviour on shut no-shutting the interface

Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
2022-07-05 13:28:26 +00:00
Rafael Zalamena
da82615d4b
Merge pull request #11371 from rampxxxx/feat_bfd_ipv4_echo_fwd_path
bfdd: add IPv4 BFD Echo support that loops pkts in forwarding plane
2022-07-05 07:10:11 -03:00
Kuldeep Kashyap
296b75ed2a tests: Fix for multicast_pim_bsm_topo1 key error
Issue was reported by Donald, we were hitting
with key not found error and execution was
stopped, which is fixed by this PR.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-07-04 23:00:31 -07:00
Donatas Abraitis
bc7e6a17d4 tests: Check if we allow using IPv4 Class E for peering/next-hops
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-01 23:38:14 +03:00
Louis Scalbert
90557c3fce topostest: bgp_conditional_advertisement cleanup
The bgp_conditional_advertisement topotest runs all the test cases in
the same function. It is not easy to debug it because the pytest
"--pause" argument does not make breaks between test cases.

Dispatch the test-cases into functions to benefit from the "--pause"
feature.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-07-01 16:49:52 +02:00
Dmitrii Turlupov
f3fd7196eb ospfd: set/unset bfd profile
Before this patch we can enable 'ip ospf bfd' via '[no] ip ospf bfd profile ...' commads.
After patch '[no] ip ospf bfd profile ...' actual only if 'ip ospf bfd' is set.

Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
2022-06-30 10:56:34 +03:00
Donald Sharp
a747bf5f45
Merge pull request #11484 from opensourcerouting/fix/allow_using_bgp_roles_for_peer_groups
bgpd: Make sure peer-groups/unnumbered work too with BGP role
2022-06-28 14:31:48 -04:00
Donatas Abraitis
83f9be4291
Merge pull request #11456 from ARShreenidhi/default_originate_vrf_automation
tests : bgp-default-originate in vrf scenerio
2022-06-28 18:51:05 +03:00
Donatas Abraitis
7dddd1f733 bgpd: Make sure peer-groups/unnumbered work too with BGP role
Just adding a support for peer-groups, because now it's not possible to
configure BGP role for peer-groups.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-06-28 18:32:11 +03:00
ARShreenidhi
034c15b946 tests : bgp-default-originate in vrf scenerio
testcase in this script covers the default originate behavious in VRFs

Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
2022-06-28 12:48:19 +00:00
lynnemorrison
0fb24aa031 tests: update timers in BFD VRF test
Increase BFD Echo timers to make test stable.

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
2022-06-28 07:53:30 -04:00
Russ White
03f064dacb
Merge pull request #11236 from LabNConsulting/ziemba/topotest-srte-route-routemap-policy-order
topotests/isis_sr_te_topo1: test out-of-order route/route-map changes
2022-06-28 06:57:38 -04:00
Igor Ryzhov
f50249661a
Merge pull request #11434 from donaldsharp/more_test_fixups
Crash fix and test fix and some cleanup
2022-06-28 13:06:35 +03:00
Donatas Abraitis
f646c17a43
Merge pull request #11426 from error2407/open_policy
bgpd: Add RFC9234 implementation
2022-06-27 09:57:29 +03:00
G. Paul Ziemba
b5635d7575 toptests/isis_sr_te_topo1: test out-of-order route/route-map changes
A SR policy matches a BGP nexthop based on the IP address of
    the nexthop and the color of the route (color may be assigned
    to routes using a route-map).

    The order of events (BGP route arrival, route-map definition,
    policy and candidate-path definition) should not affect the
    matching/mapping.

    These changes add tests for:

	- removing/adding BGP route after policy and routemap are
	  defined and held constant

	- changing route map color to be different from policy color,
	  and then changing back to match

    after each change, the policy should be observed to be in effect
    unchanged from before, i.e., the route's nexthops should reflect
    the matching SR policy.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2022-06-26 14:38:22 -07:00
Eugene Bogomazov
ed80211ad8 bgpd: update topotests for role mismatch
In topotests, we also want to check for role mismatch cases. However, if
we are testing the sender of a role mismatch notification, sometimes it
can have non-deterministic behavior (probably due to a configuration
change). Thus, there is an assumption that the recipient of
notifications will more consistently display the reason why the session
was terminated in the first place.

Signed-off-by: Eugene Bogomazov <eb@qrator.net>
2022-06-24 12:55:24 +03:00
Donald Sharp
de448ea2e8 tests: Increase time for zebra_seg6local to look for sharp routes
I have a test failure:
            r1.vtysh_cmd(
                "sharp install seg6local-routes {} nexthop-seg6local dum0 {} 1".format(
                    dest, context
                )
            )
            test_func = partial(
                check,
                r1,
                dest,
                manifest["out"],
            )
            success, result = topotest.run_and_expect(test_func, None, count=5, wait=1)
>           assert result is None, "Failed"
E           AssertionError: Failed
E           assert Generated JSON diff error report:
E
E             > $: d2 has the following element at index 0 which is not present in d1:
E
E             	{
E             	    "prefix": "1::1/128",
E             	    "protocol": "sharp",
E             	    "selected": true,...
E

The test output for 1::1/128:
	{
	  "1::1/128":[
	    {
	      "prefix":"1::1/128",
	      "prefixLen":128,
	      "protocol":"sharp",
	      "vrfId":0,
	      "vrfName":"default",
	      "selected":true,
	      "destSelected":true,
	      "distance":150,
	      "metric":0,
	      "queued":true,
	      "table":254,
	      "internalStatus":8,

Notice that it is still queued after 5 seconds.  Under extremely heavy system load
this is not long enough for convergence.  Also the zebra.log shows thread starvation
as well as long running tasks
2022/06/17 15:30:02 ZEBRA: [PHJDC-499N2][EC 100663314] STARVATION: task dplane_incoming_request (55b3ce0fea8b) ran for 6369ms (cpu time 0ms)
2022/06/17 15:30:02 ZEBRA: [T83RR-8SM5G] zebra 8.4-dev starting: vty@2601
2022/06/17 15:30:02 ZEBRA: [YZRX4-ZXG0C][EC 100663315] Thread Starvation: {(thread *)0x55b3ce6c15b0 arg=0x0 timer  r=-6.375     rib_sweep_route() &zrouter.sweeper from zebra/main.c:447} was scheduled to pop greater than 4s ago

Increasing the time to 25 seconds to give it a chance.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-06-23 13:58:03 -04:00
Donald Sharp
37076cae05 tests: Fix regex complaints by python3
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-06-23 13:58:03 -04:00
Christian Hopps
9495c4056f tests: add ospf api router ID topotest
Signed-off-by: Christian Hopps <chopps@labn.net>
2022-06-23 05:01:40 -04:00
Jafar Al-Gharaibeh
3971e02928
Merge pull request #11448 from gpnaveen/ospf_scripts_stbl
tests: Removing invalid step from OSPF tests.
2022-06-21 13:44:33 -05: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
Russ White
e63a5c42dd
Merge pull request #11352 from ARShreenidhi/default_originate_automation
tests  : bgp default-originate test suite automation
2022-06-21 11:33:47 -04:00
Eugene Bogomazov
aee05e20fd bgpd: Update topotests for RFC 9234
In the previous version, the time.sleep function was included to wait
for the moment when the routes were sent to all routers. Changed this
function to topotest.run_and_expect for more deterministic behavior.

Signed-off-by: Eugene Bogomazov <eb@qrator.net>
2022-06-21 17:41:53 +03:00
Eugene Bogomazov
8f2d6021f8 bgpd: Add patches for RFC9234 implementation
This commit fixes some issues that were noted by the reviewer

Signed-off-by: Eugene Bogomazov <eb@qrator.net>
2022-06-21 17:41:53 +03:00
nguggarigoud
d5bd355430 tests: Removing invalid step from ospf tests.
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-06-21 02:21:35 -07:00
ARShreenidhi
f10d6c5b0b tests : bgp_default_originate testcase w.r.t topology1 added
this PR contains the basic bgp default originate.
Details of the testcase is available in respective script files

Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
2022-06-21 06:25:20 +00:00