summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2019-02-25*: Rename backet to bucketTim Bray
Presume typo from original author Signed-off-by: Tim Bray <tim@kooky.org>
2019-02-18Merge pull request #3777 from donaldsharp/topotest_all_routesDavid Lamparter
topotests: Add code to ensure routes are as expected
2019-02-13Merge pull request #3622 from mjstapp/fix_cpp_compileDonald Sharp
libs, daemons: changes to permit c++ compilation
2019-02-13Merge pull request #3753 from LabNConsulting/working/master/topotest-l3mdev=1Donald Sharp
topotest: bgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdev
2019-02-11tests: add C++ header compatibility smoke testDavid Lamparter
Compiling an empty C file with most headers included and -Wc++-compat gives us a build error if we introduce some stupid C++-incompatible change. While this won't catch everything, it's a good start. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-11topotests: Add code to ensure routes are as expectedDonald Sharp
This code just ensures that v4 and v6 routes are as expected in the rib. While this test addition is not that complicated it would have caught some issues while I was attempting to handle the switchover to a different style of rib processing. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-02-11eigrpd: Do not redelete the eigrp interface data structureDonald Sharp
On interface down do not delete the eigrp interface data structure. Ensure that the address that we have setup the eigrp data structure ontop of is what we are deleting. Additionally add a test to show that this is no-longer crashing eigrp. Future commits will further modify this test to actually ensure that the eigrp topo is updated correctly and the rib has the correct data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-02-10zebra: Update zserv debug messages to give a bit more useful infoDonald Sharp
When we schedule a packet for future handling, list the packet type so that we can see what we are getting with debugs. Also note which client and how many packets we received from that client. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-02-07bgp_l3vpn_to_bgp_vrf: verify TCP l3mdev set as expectedLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2019-02-07bgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdevLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2019-02-05doc: move topotests docs to developers guideQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-03eigrpd: Modify code to pass down metric to zebraDonald Sharp
Modify EIGRP code to pass its used metric down to zebra. Additionally update topotests to pass with these changes. Fixes: #3703 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-30build: fix a whole bunch of *FLAGSDavid Lamparter
- some target_CFLAGS that needed to include AM_CFLAGS didn't do so - libyang/sysrepo/sqlite3/confd CFLAGS + LIBS weren't used at all - consistently use $(FOO_CFLAGS) instead of @FOO_CFLAGS@ - 2 dependencies were missing for clippy Signed-off-by: David Lamparter <equinox@diac24.net>
2019-01-25bgpd: interface based peers should automatically override it's peer groupDonald Sharp
When a interface based peer is setup and if it is part of a peer group we should ignore this and just use the PEER_FLAG_CAPABILITY_ENHE no matter what. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-24Treewide: use ANSI function definitionsRuben Kerkhof
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2019-01-22topotests: Modify bgp convergence to be more than 120 secondsDonald Sharp
Waiting 10 seconds for bgp convergence makes no sense, especially if the test system is under load and a node is started up before the node it is connecting to is up. We should wait for the full default of 120 seconds, plus a little time to ensure nothing is screwed up too much. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-07bgp_rfapi_basic_sanity_config2: delayed timeouts not supported without VNC attrLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2019-01-07bgp_rfapi_basic_sanity: delayed timeouts not supported without VNC attrLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-12-20Merge pull request #3499 from donaldsharp/topotest_inheritanceRafael Zalamena
Topotest inheritance
2018-12-18Merge pull request #3279 from adharkar/frr-default_localMartin Winter
bgpd: Display default local preference and local AS for BGP show commands
2018-12-17topotests: add FreeBSDRouter abstractionDonald Sharp
Start the addition of FreeBSDRouter class that inherits from class Router. At this point we do not do a whole lot. We just come up on FreeBSD, lots of stuff that still needs to be fixed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-17topotests: Move linux specific config into Linux config sectionDonald Sharp
As part of the class rework, move the linux specific config into the LinuxRouter.config section instead of being in the Router class. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-17topotests: Make 'LinuxRouter' a class of 'Router'Donald Sharp
Modify the LinuxRouter code such that it inherits from the Router class. This is setup work for (a) pulling out linux specific config from class Router and (b) creating a FreebsdRouter that inherits from class 'Router'. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-16topotests: Allow sharpd to be used in topotestsDonald Sharp
The sharp daemon did not have any ability to be used in topotests. Add some code to allow this. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-16topotests: module_present should return a True/FalseDonald Sharp
The recent change to module_present accidently didn't return anything. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-15topotests: Start abstraction of module_present for other platformsDonald Sharp
Start abstraction of the module_present into module_present_linux and freebsd To allow for multiple platforms that the topotests can be run on. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-15topotests: Cleanup diagnose_env to allow thought about multi-platformsDonald Sharp
Start the cleanup of diagnose_env to allow the running of topotests on platforms besides linux. So we split up diagnose_env into linux and freebsd variants. At this point in time freebsd doesn't have any special code. To be determined in the future. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-12topotests: Add a basic route leak vrf testDonald Sharp
A recent commit broke this functionality, so add a very basic route leak vrf test. router bgp 99 vrf DONNA address-family ipv4 uni redistribute connected import vrf EVA router bgp 99 vrf EVA address-family ipv4 uni redistribute connected import vrf DONNA Routes should be leaked between the two vrf's. Ensure that it does. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-10tests/topotests: Pull docker image from registryChristian Franke
We have set up automated builds for the topotest images at dockerhub. Therefore, people don't need to perform a local build to run the topotests on docker, but can use the image built by dockerhub. As there is not much benefit in building locally, but the disadvantage of weird errors if using an outdated image, change the topotests target to always pull the most recent image from dockerhub. Add an environment variable to disable this, e.g. for local development. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-09lib, tests: add support for keyless YANG listsRenato Westphal
YANG allows lists without keys for operational data, in which case the list elements are uniquely identified using a positional index (starting from one). This commit does the following: * Remove the need to implement the 'get_keys' and 'lookup_entry' callbacks for keyless lists. * Extend nb_oper_data_iter_list() so that it special-cases keyless lists appropriately. Since both the CLI and the sysrepo plugin use nb_oper_data_iterate() to fetch operational data, both these northbound clients automatically gain the ability to understand keyless lists without additional changes. * Extend the confd plugin to special-case keyless lists as well. This was a bit painful to implement given ConfD's clumsy API, but keyless lists should work ok now. * Update the "test_oper_data" unit test to test keyless YANG lists in addition to regular lists. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-12-09Merge pull request #3452 from opensourcerouting/reprobuild-masterDonald Sharp
[master] build reproducibility
2018-12-09Merge pull request #3442 from opensourcerouting/confirmed-commitsDonald Sharp
lib: add support for confirmed commits
2018-12-08Merge pull request #3420 from LabNConsulting/working/master/topotest/ce4-in-vrfDonald Sharp
Topotest: put ce4 into vrf (no default), plus a couple of lib changes
2018-12-08topotest: bgp_l3vpn_to_bgp_vrf put ce4 into vrf (without a default)Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-12-08topotests/lib: help script writers understand wrong VRF failureLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-12-08topotest: remove sleep on staticd startupLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-12-07tests: fix domainname dependencyDavid Lamparter
These are causing random test failures when the host's domainname is actually set to something (as opposed to empty/unset, which it is 99% of times.) Signed-off-by: David Lamparter <equinox@diac24.net>
2018-12-07lib: add support for confirmed commitsRenato Westphal
Confirmed commits allow the user to request an automatic rollback to the previous configuration if the commit operation is not confirmed within a number of minutes. This is particularly useful when the user is accessing the CLI through the network (e.g. using SSH) and any configuration change might cause an unexpected loss of connectivity between the user and the managed device (e.g. misconfiguration of a routing protocol). By using a confirmed commit, the user can rest assured the connectivity will be restored after the given timeout expires, avoiding the need to access the router physically to fix the problem. When "commit confirmed TIMEOUT" is used, a new "commit" command is expected to confirm the previous commit before the given timeout expires. If "commit confirmed TIMEOUT" is used while there's already a confirmed-commit in progress, the confirmed-commit timeout is reset to the new value. In the current implementation, if other users perform commits while there's a confirmed-commit in progress, all commits are rolled back when the confirmed-commit timeout expires. It's recommended to use the "configure exclusive" configuration mode to prevent unexpected outcomes when using confirmed commits. When an user exits from the configuration mode while there's a confirmed-commit in progress, the commit is automatically rolled back and the user is notified about it. In the future we might want to prompt the user if he or she really wants to exit from the configuration mode when there's a pending confirmed commit. Needless to say, confirmed commit only work for configuration commands converted to the new northbound model. vtysh support will be implemented at a later time. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-12-06Merge pull request #3437 from opensourcerouting/bugfix/topotests-use-copyDonald Sharp
tests/topotests: Use copied tests in Docker
2018-12-06tests/topotests: Also search sbin for modprobeChristian Franke
We call `modprobe -n` to check if mpls modules are available to be loaded. We do this as normal user, to only ask for root permissions if we are actually loading the module. This breaks if `modprobe` is in `/sbin` and normal users don't have sbin in path. So add `/sbin` to the search path to work around this. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-06tests/topotests: Use copied tests in DockerChristian Franke
If we mount the tests into the container from the host, we also mount any `*.pyc` files with them, which will lead to issues as the mount is done read-only to avoid any changes to the host. Since the tests are now integrated and we already create a writeable copy of the FRR tree, just use the tests from the FRR tree to avoid this issue. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-05bgp: new topotest BGP templates to display default local preference and ↵Ameya Dharkar
local-AS in BGP commands This commit adds a template for "show bgp ipv4/ipv6" display to include default local preference and local-AS O/P. Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2018-12-04Merge pull request #3174 from opensourcerouting/feature/isis-triggered-helloOlivier Dugeon
Feature: IS-IS triggered hello
2018-12-04topotests: Update json_cmp_result to return readable resultChristian Franke
Before this update, json_cmp_results which were formatted as strings would not show the error mesage but just an object reference. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-04topotests/isis-topo1: Set useful IS-IS debugsChristian Franke
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-01Revert "tests/topotests: Change docker build context"Christian Franke
This reverts commit 659782730bffea2d21e2fa22550db3166017061e. Apparently, the build context is inferred from the Dockerfile path. Yay for sensible documentation. :/ Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-01tests/topotests: Set -o cache_dir=/tmpChristian Franke
We are mounting the topotests from the host into the container and mark them as read-only to avoid any modifications to the host. Pytest tries to create a .pytest_chache directory in that location which fails because of the read-only mount. Configure a different cache dir which is writable to resolve this. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-01tests/topotests: Change docker build contextChristian Franke
In order to support automated builds, the build context needs to be the repository root. So adapt our dockerfile and buildscript for this. Also, add files which should not be included into the build context in .dockerignore to limit the size of the build context to something sensible. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-12-01tests/topotests: Update documentationChristian Franke
The documentation needs an update to match the integrated version. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-30Merge pull request #3396 from opensourcerouting/feature/topotests-dockerDonald Sharp
feature: docker image for topotests