summaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: fix missing gitignore entryIgor Ryzhov2021-05-171-0/+1
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* Merge pull request #8556 from donaldsharp/bgp_pbr_weirdRuss White2021-05-141-0/+4
|\ | | | | Bgp flowspec cleanups
| * tests: Add pytestmark to the flowspec topotestDonald Sharp2021-05-121-0/+4
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | Merge pull request #8144 from LabNConsulting/chopps/ly2Martin Winter2021-05-147-7/+4
|\ \ | | | | | | libyang2
| * | lib: adapt to version 2 of libyangChristian Hopps2021-05-137-7/+4
| |/ | | | | | | | | | | | | | | | | Compile with v2.0.0 tag of `libyang2` branch of: https://github.com/CESNET/libyang staticd init load time of 10k routes now 6s vs ly1 time of 150s Signed-off-by: Christian Hopps <chopps@labn.net>
* | Merge pull request #8649 from ton31337/fix/unify-naming-for-topotests-directoryDonald Sharp2021-05-132083-1/+1
|\ \ | | | | | | tests: Rename tests/topotests directories to be consistent
| * | tests: Skip example_topojson_test and example_test from being testedDonatas Abraitis2021-05-121-1/+1
| | | | | | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
| * | tests: Unify directory naming for topotestsDonatas Abraitis2021-05-112082-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change every `-` to `_` in directory names. This is to avoid mixing _ and -. Just for consistency and directory sorting properly. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | tests: Fix pylint issues in test_bgp_recursive_route_ebgp_multi_hop.pyDonald Sharp2021-05-121-15/+15
| |/ |/| | | | | | | | | Tests had format for strings with 2 variables but 1 place to put the data. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | Merge pull request #8509 from volta-networks/pathd_ls_clientOlivier Dugeon2021-05-1226-0/+1384
|\ \ | |/ |/| pathd: Traffic Engineering Database support
| * pathd. TED support . Topotest - [part 3/4]Javier Garcia2021-05-1026-0/+1384
| | | | | | | | Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
* | Merge pull request #8648 from idryzhov/fix-test-assertDavid Lamparter2021-05-101-1/+1
|\ \ | |/ |/| tests: fix build warning
| * tests: fix build warningIgor Ryzhov2021-05-091-1/+1
| | | | | | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | Merge pull request #8441 from mjstapp/fix_topo_pylint1David Lamparter2021-05-099-747/+1131
|\ \
| * | tests: run black over mcast-pim-static, static_routing_with_[ei]bgpMark Stapp2021-04-139-523/+888
| | | | | | | | | | | | | | | | | | Run black and clean up formatting along with pylint cleanup. Signed-off-by: Mark Stapp <mjs@voltanet.io>
| * | tests: fix pylint errors in static_routing_with_ibgpMark Stapp2021-04-134-119/+120
| | | | | | | | | | | | | | | | | | Fix pylint errors. Signed-off-by: Mark Stapp <mjs@voltanet.io>
| * | tests: fix pylint errors in static_routing_with_ebgp testsMark Stapp2021-04-134-188/+195
| | | | | | | | | | | | | | | | | | | | | Fix pylint errors; also enable the test in 'topo4', which has never run. Signed-off-by: Mark Stapp <mjs@voltanet.io>
| * | tests: fix pylint errors in mcast-pim-static-rp-topo1Mark Stapp2021-04-131-188/+199
| | | | | | | | | | | | | | | | | | Fix pylint errors. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | | Merge pull request #8626 from idryzhov/fix-isis-topo1David Lamparter2021-05-096-267/+313
|\ \ \ | | | | | | | | tests: fix isis-topo1 topologies
| * | | tests: fix isis-topo1 topologiesIgor Ryzhov2021-05-056-267/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parse_topology function doesn't correctly process vertex types with spaces. Therefore the reference topology files are completely messed up, we have values in incorrect fields - types in metrics, metrics in parents, etc. This commit fixes the parsing function and the reference files. The same fix was done for isis-topo1-vrf in #8365. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | | | Merge pull request #8380 from mjstapp/nexthop_cmp_basicDavid Lamparter2021-05-093-0/+215
|\ \ \ \
| * | | | tests: add unit test for nexthop comparisonsMark Stapp2021-05-043-0/+215
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Add a nexthop unit test module, just exercising the 'basic' comparison api for now. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | | | Merge pull request #8640 from pjdruddy/fix-bgp-auth-key-errorDavid Lamparter2021-05-091-3/+4
|\ \ \ \ | |_|_|/ |/| | | tests: fix intermittent key error in bgp-auth topotest
| * | | tests: fix intermittent key error in bgp-auth topotestPat Ruddy2021-05-061-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a rare case where with prefix peers the peer is completely absent from the json output when checking the peer state resulting in a python key error. Check key exists before checking the state. Signed-off-by: Pat Ruddy <pat@voltanet.io>
* | | | bgpd: rework BGP_MAX_PACKET_SIZE & friendsQuentin Young2021-05-063-5/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BGP_MAX_PACKET_SIZE no longer represented the absolute maximum BGP packet size as it did before, instead it was defined as 4096 bytes, which is the maximum unless extended message capability is negotiated, in which case the maximum goes to 65k. That introduced at least one bug - last_reset_cause was undersized for extended messages, and when sending an extended message > 4096 bytes back to a peer as part of NOTIFY data would trigger a bounds check assert. This patch redefines the macro to restore its previous meaning, introduces a new macro - BGP_STANDARD_MESSAGE_MAX_PACKET_SIZE - to represent the 4096 byte size, and renames the extended size to BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE for consistency. Code locations that definitely should use the small size have been updated, locations that semantically always need whatever the max is, no matter what that is, use BGP_MAX_PACKET_SIZE. BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE should only be used as a constant when storing what the negotiated max size is for use at runtime and to define BGP_MAX_PACKET_SIZE. Unless there is a future standard that introduces a third valid size it should not be used for any other purpose. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
* | | Merge pull request #8636 from idryzhov/ospfv3-vrf-supportRafael Zalamena2021-05-0619-0/+888
|\ \ \ | | | | | | | | OSPFv3 VRF support
| * | | tests: add topotest for ospf6d vrf supportharios_niral2021-05-0619-0/+888
| |/ / | | | | | | | | | | | | Co-authored-by: Kaushik Nath <kaushiknath.null@gmail.com> Signed-off-by: harios_niral <hari@niralnetworks.com>
* | | Merge pull request #8497 from ton31337/feature/bgp_community_aliasDonald Sharp2021-05-066-0/+135
|\ \ \ | | | | | | | | bgpd: Create BGP alias names for community/large-community
| * | | tests: Check if `bgp community alias NAME ALIAS` commands worksDonatas Abraitis2021-05-056-0/+135
| | | | | | | | | | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | Merge pull request #8598 from idryzhov/fix-topotest-bgp-authDonald Sharp2021-05-051-77/+69
|\ \ \ \ | |/ / / |/| | | tests: fix bgp-auth topotest
| * | | tests: fix bgp-auth topotestIgor Ryzhov2021-05-011-77/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Individual tests must not depend on each other. In particular, a test can't be sure that the previous test config is applied or cleared. It is definitely not true when a single test is executed, for example: `test_bgp_auth.py::test_prefix_peer_remove_passwords`. This commit makes all tests independent of each other. It also adds a call to check_all_peers_established at the start of "remove_passwords" tests to make sure that we not only block new peers with an incorrect password, but also clean the existing peers. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | | | Merge pull request #8564 from rameshabhinay/bgp_tcp_mssDonatas Abraitis2021-05-056-0/+202
|\ \ \ \ | | | | | | | | | | bgpd: Support tcp-mss for bgp neighbors
| * | | | bgpd: Support tcp-mss for bgp neighborsAbhinay Ramesh2021-05-046-0/+202
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem Statement: ================= In scale setup BGP sessions start flapping. RCA: ==== In virtualized environment there are multiple places where MTU need to be set. If there are some places were MTU is not set properly then there is chances that BGP packets get fragmented, in scale setup this will lead to BGP session flap. Fix: ==== A new tcp option is provided as part of this implementation, which can be configured per neighbor and helps to set the TCP max segment size. User need to derive the path MTU between the BGP neighbors and set that value as part of tcp-mss setting. 1. CLI Configuration: [no] neighbor <A.B.C.D|X:X::X:X|WORD> tcp-mss (1-65535) 2. Running config frr# show running-config router bgp 100 neighbor 198.51.100.2 tcp-mss 150 => new entry neighbor 2001:DB8::2 tcp-mss 400 => new entry 3. Show command frr# show bgp neighbors 198.51.100.2 BGP neighbor is 198.51.100.2, remote AS 100, local AS 100, internal link Hostname: frr Configured tcp-mss is 150, synced tcp-mss is 138 => new display 4. Show command json output frr# show bgp neighbors 2001:DB8::2 json { "2001:DB8::2":{ "remoteAs":100, "bgpTimerKeepAliveIntervalMsecs":60000, "bgpTcpMssConfigured":400, => new entry "bgpTcpMssSynced":388, => new entry Risk: ===== Low - This is a config driven feature and it sets the max segment size for the TCP session between BGP peers. Tests Executed: =============== Have done manual testing with three router topology. 1. Executed basic config and un config scenarios 2. Verified if the config is updated in running config during config and no config operation 3. Verified the show command output in both CLI format and JSON format. 4. Verified if TCP SYN messages carry the max segment size in their initial packets. 5. Verified the behaviour during clear bgp session. 6. done packet capture to see if the new segment size takes effect. Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
* | | | tests: add scapy to topotests DockerDavid Lamparter2021-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not having scapy in the docker image leads to very obtuse failures in the pim bsm tests (obtuse, as in, it just fails without any hint as to why...) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | | lib: add *_swap_all to typesafe containersDavid Lamparter2021-05-031-7/+119
|/ / / | | | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | Merge pull request #8545 from opensourcerouting/assert-our-ownMark Stapp2021-05-037-5/+132
|\ \ \ | |/ / |/| | *: make our own assert() actually work
| * | tests: fix assert.h header change falloutDavid Lamparter2021-05-023-3/+4
| | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | lib: rework how we "override" assert()David Lamparter2021-05-024-1/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous method, using zassert.h and hoping nothing includes assert.h (which, on glibc at least, just does "#undef assert" and puts its own definition in...) was fragile - and actually broke undetected. Just provide our own assert.h and control overriding by putting it in a separate directory to add to the include path (or not.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | *: drop zassert.hDavid Lamparter2021-04-231-1/+0
| | | | | | | | | | | | | | | | | | It's not actually working properly... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | Merge pull request #8588 from idryzhov/a-lot-of-isis-fixesRafael Zalamena2021-04-306-24/+22
|\ \ \ | | | | | | | | a lot of isis fixes
| * | | isisd: fix ldp-sync configurationIgor Ryzhov2021-04-293-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | YANG model and CLI commands allow user to configure LDP-sync per area. But the actual implementation is incorrect - all commands are changing the config for the whole VRF instead of a single area. This commit fixes this issue by actually implementing per area configuration. Fixes #8578. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
| * | | isisd: allow arbitrary order of area/interface configurationIgor Ryzhov2021-04-293-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we don't allow to configure the interface before the area is configured. This approach has the following issues: 1. The area config can be deleted even when we have an interface config relying on it. The code is not ready for that - we'll have a whole bunch of stale pointers if user does that. 2. The code doesn't correctly process the event of changing the VRF for an interface. There is no mechanism to ensure that the area exists in the new VRF so currently the circuit still stays in the old VRF. This commit allows an arbitrary order of area/interface configuration. There is no more need to configure the area before configuring the interface. This change fixes both the issues. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | | | ospfd: show ip ospf interface only shows BDR info, Added DR info.rgirada2021-04-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: DR information is missing under "show ip ospf interface [json]". Added DR infomation to display in "show ip ospf interface". Signed-off-by: Rajesh Girada <rgirada@vmware.com>
* | | | Merge pull request #8546 from ton31337/fix/add_markers_for_recent_bgpdQuentin Young2021-04-282-0/+4
|\ \ \ \
| * | | | tests: Add pytest bgpd markers for recent BGP testsDonatas Abraitis2021-04-272-0/+4
| |/ / / | | | | | | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | Merge pull request #8322 from qlyoung/topotestsJafar Al-Gharaibeh2021-04-282-55/+6
|\ \ \ \ | | | | | | | | | | Assorted topotests cleanup
| * | | | tests: fix use of undefined variable in pim libQuentin Young2021-04-071-2/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@nvidia.com>
| * | | | tests: fix improper format strings in pim libQuentin Young2021-04-071-8/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@nvidia.com>
| * | | | tests: remove duplicate pim test functionQuentin Young2021-04-071-45/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Twice defined Signed-off-by: Quentin Young <qlyoung@nvidia.com>
| * | | | tests: provide sane default for --topology-onlyQuentin Young2021-04-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: /usr/lib/python3.9/site-packages/_pytest/config/__init__.py:1463: in getoption val = getattr(self.option, name) E AttributeError: 'Namespace' object has no attribute 'topology_only' The above exception was the direct cause of the following exception: /usr/lib/python3.9/site-packages/pluggy/manager.py:127: in register hook._maybe_apply_history(hookimpl) /usr/lib/python3.9/site-packages/pluggy/hooks.py:333: in _maybe_apply_history res = self._hookexec(self, [method], kwargs) /usr/lib/python3.9/site-packages/pluggy/manager.py:93: in _hookexec return self._inner_hookexec(hook, methods, kwargs) /usr/lib/python3.9/site-packages/pluggy/manager.py:84: in <lambda> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( tests/topotests/conftest.py:62: in pytest_configure if config.getoption("--topology-only"): /usr/lib/python3.9/site-packages/_pytest/config/__init__.py:1474: in getoption raise ValueError(f"no option named {name!r}") from e E ValueError: no option named 'topology_only' Signed-off-by: Quentin Young <qlyoung@nvidia.com>