summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-10-23Merge pull request #7184 from opensourcerouting/anycast-sids-v4Olivier Dugeon
isisd: refactor Prefix-SID code + Anycast-SIDs (v2)
2020-10-23tests: extend the isisd SR topotest to test Anycast-SIDs as wellRenato Westphal
Add the following Anycast-SIDs on routers rt4 and rt5: * segment-routing prefix 10.10.10.10/32 index 100 no-php-flag n-flag-clear * segment-routing prefix 2001:db8:1000::10/128 index 101 no-php-flag n-flag-clear The updated JSON data will then check whether the Anycast-SIDs are being processed as expected (e.g. rt1 should use ECMP to rt2 and rt3, rt2 should use rt4 only as it's directly connected, etc). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-23isisd: fix the TI-LFA repair paths to preserve the original Prefix-SIDRenato Westphal
When computing backup nexthops for routes that contain a Prefix-SID, the original Prefix-SID label should be present at the end of backup label stacks (after the repair labels). This commit fixes that oversight in the original TI-LFA code. The SPF unit tests and TI-LFA topotes were also updated accordingly. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-23isisd: refactor handling of SR Prefix-SIDsRenato Westphal
Embed Prefix-SID information inside SPF data structures so that Prefix-SIDs can be installed together with their associated routes at the end of the SPF algorithm. This is different from the current implementation where Prefix-SIDs are parsed and processed separately, which is vastly suboptimal. Advantages of the new code: * No need to parse the LSPDB an additional time to detect and process SR-related changes; * Routes are installed with their Prefix-SID labels in the same ZAPI message. This can prevent packet dropping for a few milliseconds after each SPF run if there are BGP-labeled routes (e.g. L3VPN) that recurse on IGP labeled routes; * Much easier to support Anycast-SIDs, as the SPF code will naturally figure out the best nexthops and use only them (that can't be done in any reasonable way if the Prefix-SID Sub-TVLs are processed separately); * Less code to maintain and reduced memory footprint; The "show isis segment-routing prefix-sids" command was removed as it doesn't make sense anymore now that "show isis route" exists. Prefix-SIDs are a property of routes, so what was done was to extend the "show isis route" command with a new "prefix-sid" option that changes the output table to show the Prefix-SID information associated to each route. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-23isisd: create routes for local destinationsRenato Westphal
This is preparatory change for the upcoming SR Prefix-SID refactoring. Since Prefix-SID information will be stored inside IS-IS routes (instead of being maintained separately), it will be necessary to have local routes in order to store local Prefix-SID information. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-23* : update signature of thread_cancel apiMark Stapp
Change thread_cancel to take a ** to an event, NULL-check before dereferencing, and NULL the caller's pointer. Update many callers to use the new signature. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-10-23Merge pull request #7345 from opensourcerouting/bgp-aggr-suppressDonatas Abraitis
bgpd: aggregate-address suppress-map
2020-10-22bgpd,topotests: log route suppression messagesRafael Zalamena
To see the messages activate the BGP debug: `debug bgp updates`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-10-22:* Convert prefix2str to %pFXDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-10-21topotests: test aggregate address suppress mapRafael Zalamena
Add test for new aggregate address option: test aggregate address option without converged routes, then test again with a different route map with converged routes. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-10-21Merge pull request #7276 from donaldsharp/speedup_isis_topotestsMartin Winter
tests: add `lsp-gen-interval 2` to isis configuration
2020-10-17*: Create/Use accessor functions for lock countDonald Sharp
Create appropriate accessor functions for the rn->lock data. We should be accessing this data through accessor functions since it is private data to the data structure. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-16tests: fix spurious failures in the TI-LFA topotestRenato Westphal
Skip comparing neighbor-extended-circuit-id in yang output. They are not consistent. This is similar to commit ecc11c93b7eace which fixed the same problem in the IS-IS SR topotest. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-14tests: add IS-IS TI-LFA topotestRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-14tests: add IS-IS TI-LFA unit testsRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-14Merge pull request #7180 from kuldeepkash/bgp-communitiesDonald Sharp
tests: Add bgp_communities_topo1 test suite
2020-10-13tests: Enable evpn_type5_test_topo1 suite to run in CIKuldeep Kashyap
1. Suite: evpn_type5_test_topo1 was added to pytest.ini during triaging phase as there was bug: https://github.com/FRRouting/frr/issues/6867, which is fixed. Enabling suite to be run in CI. Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-10-13tests: Add bgp_communities_topo1 test suiteKuldeep Kashyap
1. Adding test to verify well known communities: no-export, local-AS, internet 2. Exection time is 90 sec Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-10-11ospf6d, tests: Prevent use after freeDonald Sharp
The code pattern: for (ALL_LSDB(lsdb, lsa)) { remove_lsa(lsa) } has a use after free in ALL_LSDB, since we ask for the next pointer, after it has been freed. Modify the code such that we grab the next pointer before we can possibly free it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-10-10tests: add `lsp-gen-interval 2` to isis configurationDonald Sharp
Force faster generation of lsp's and also cause the networks to converge faster. All affected tests run faster now. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-08tests: bgp_l3vpn_to_bgp_vrf test needed to correct orderQuentin Young
The bgp_l3vpn_to_bgp_vrf test is looking for a prefix on multiple routers that the ordered received is non-deterministic. As such the regex's are failing occassionaly when the route is received in an unexpected order. One possible order: (#89) scripts/check_routes.py:120 COMMAND:ce3:vtysh -c "show bgp ipv4 uni 6.0.1.0":2 available, best .*192.168.1.1.* Local.* 99.0.0.3 from 0.0.0.0 .99.0.0.3.* Origin IGP, metric 200, localpref 50, weight 32768, valid, sourced, local, best .Weight.* Community: 0:67.* Extended Community: RT:89:123.* Large Community: 12:34:56.* Local.* 192.168.1.1 from 192.168.1.1 .192.168.1.1.* Origin IGP, metric 98, localpref 123, valid, internal.* Community: 0:67.* Extended Community: RT:52:100 RT:89:123.* Large Community: 12:34:56:pass:Redundant route 1 details c: COMMAND OUTPUT:BGP routing table entry for 6.0.1.0/24^M Paths: (2 available, best #1, table default)^M Advertised to non peer-group peers:^M 192.168.1.1^M Local^M 99.0.0.3 from 0.0.0.0 (99.0.0.3)^M Origin IGP, metric 200, localpref 50, weight 32768, valid, sourced, local, best (Weight)^M Community: 0:67^M Extended Community: RT:89:123^M Large Community: 12:34:56^M Last update: Wed Oct 7 11:12:22 2020^M Local^M 192.168.1.1 from 192.168.1.1 (192.168.1.1)^M Origin IGP, metric 98, localpref 123, valid, internal^M Community: 0:67^M Extended Community: RT:52:100 RT:89:123^M Large Community: 12:34:56^M Last update: Wed Oct 7 11:12:41 2020: R:89 ce3 Redundant route 1 details c 1 0 Second possible order: (#89) scripts/check_routes.py:120 COMMAND:ce3:vtysh -c "show bgp ipv4 uni 6.0.1.0":2 available, best .*192.168.1.1.* Local.* 99.0.0.3 from 0.0.0.0 .99.0.0.3.* Origin IGP, metric 200, localpref 50, weight 32768, valid, sourced, local, best .Weight.* Community: 0:67.* Extended Community: RT:89:123.* Large Community: 12:34:56.* Local.* 192.168.1.1 from 192.168.1.1 .192.168.1.1.* Origin IGP, metric 98, localpref 123, valid, internal.* Community: 0:67.* Extended Community: RT:52:100 RT:89:123.* Large Community: 12:34:56:pass:Redundant route 1 details c: COMMAND OUTPUT:BGP routing table entry for 6.0.1.0/24^M Paths: (2 available, best #2, table default)^M Advertised to non peer-group peers:^M 192.168.1.1^M Local^M 192.168.1.1 from 192.168.1.1 (192.168.1.1)^M Origin IGP, metric 98, localpref 123, valid, internal^M Community: 0:67^M Extended Community: RT:52:100 RT:89:123^M Large Community: 12:34:56^M Last update: Wed Oct 7 11:14:45 2020^M Local^M 99.0.0.3 from 0.0.0.0 (99.0.0.3)^M Origin IGP, metric 200, localpref 50, weight 32768, valid, sourced, local, best (Weight)^M Community: 0:67^M Extended Community: RT:89:123^M Large Community: 12:34:56^M Last update: Wed Oct 7 11:14:27 2020: R:89 ce3 Redundant route 1 details c 0 1 BGP displays the paths in the order received since it's just a linked list. For this test modify/add the luCommands to track that we may receive the paths in a non-deterministic order. Signed-off-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-10-07*: reformat python fileswhitespace
We are now using black. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-10-07Merge pull request #7239 from opensourcerouting/bgp-aggregate-medDonatas Abraitis
bgpd: aggregate-address on matching MED only
2020-10-06tests: bgp_l3vpn_to_bgp_vrf - verify details of exported/imported routesLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2020-10-06tests: bgp_l3vpn_to_bgp_vrf - change 1 route to have equal metricsLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2020-10-06tests: bgp_l3vpn_to_bgp_vrf - add bestpath checksLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2020-10-06tests: lib/bgprib.py - add bestpath checks and logging to lu log fileLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2020-10-06tests: bgp_l3vpn_to_bgp_vrf - add redundant ce routesLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2020-10-06topotests: test aggregate-address matching-MED-onlyRafael Zalamena
Add a new topology test for `aggregate-address` to test `matching-MED-only` and its combination with `summary-only`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-10-05Merge pull request #6904 from chiragshah6/yang_nb6Santosh P K
lib, bgpd: Convert global configurations to transactional cli
2020-10-03tests: add bgp yang module registery to attr testChirag Shah
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-03tests/bgpd: initialized candidate_config to vtyshChirag Shah
In test_peer_attr.c test is initializd with vty handler but candiate_config is not set. northbound converted bgp cli expects to derefence the candidate_config field which leads to crash. (gdb) p *test->vty->candidate_config $9 = {dnode = 0x0, version = 0} Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-02tests: Skip comparing neighbor-extended-circuit-id in yang output. They are ↵Martin Winter
not consistent Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-10-02tests: don't compare internal vrfId in topotestsIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-02tests: don't compare internal vrfId in topotestsIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-01Merge pull request #7226 from opensourcerouting/topotestfixesQuentin Young
tests: Topotest fixes to skip comparing InterfaceIndex and Internal status
2020-10-01Merge pull request #7224 from mjstapp/fix_topo_ptyestMartin Winter
tests: fix typos in zebra_rib and _netlink
2020-10-01tests: Topotest fixes to skip comparing InterfaceIndex and Internal status ↵Martin Winter
in json_cmp Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2020-10-01tests: fix typos in zebra_rib and _netlinkMark Stapp
Fix a couple of typos in the zebra_rib and _netlink topotest suites. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-10-01tests: fix regex in all_proto testMark Stapp
Make sure the all-protocols test_isis_interfaces testcase uses a regex substitution that includes all the hex characters. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-29Merge pull request #7201 from mjstapp/fix_topo_ubu20Donald Sharp
tests: pim-basic mcast scripts fixes for python3
2020-09-29tests: pim-basic mcast scripts fixes for python3Mark Stapp
The pim-basic suite uses some private python scripts to send and receive mcast traffic: revise them to support both py2 and py3. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-29Merge pull request #7039 from opensourcerouting/bgp-norib-runtimeDonald Sharp
bgpd: set/unset no-rib option at runtime
2020-09-29Merge pull request #7177 from mjstapp/fix_topo_tab_openDonald Sharp
tests: python3 compat fixes for topotests: tabs and misc api
2020-09-29Merge pull request #7197 from idryzhov/fix-testsDonald Sharp
tests: skip tests when building without daemon
2020-09-29tests: skip tests when building without daemonIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-09-28tests: add topotest for NHG Proto APIsStephen Worley
Add a topotest for basic NHG Proto Add/Del/Replace. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2020-09-26tests: avoid python2 regex syntaxMark Stapp
Update a few regexs to avoid python2-specific syntax Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-26tests: report uname info once per testMark Stapp
Report 'uname' info once per test, not once per configured router in each test. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-09-26tests: improve unicode handlingMark Stapp
Support more of the string/unicode interactions in various topotests. Signed-off-by: Mark Stapp <mjs@voltanet.io>