summaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: bgp_l3vpn_to_bgp_vrf were bailing to quicklyDonald Sharp2019-04-181-2/+2
| | | | | | | | The tests are not coming up consistently on my test box. Add a bit of wait time to test to allow normal bgp when the first attempt doesn't come up. Especially since bgp timeouts are 120 seconds with non datacenter compiles. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge pull request #3779 from opensourcerouting/fix-mpls-label-topotestsQuentin Young2019-04-093-24/+0
|\ | | | | tests: Remove some inconsistent local labels in check in test_ldp_vpls_topo1
| * tests: test_ldp_vpls_topo1 Remove some inconsistent labels in checkMartin Winter2019-04-043-24/+0
| | | | | | | | Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
* | Merge pull request #3899 from ton31337/fix/remove_private_as_with_local_asLou Berger2019-04-0410-0/+157
|\ \ | | | | | | bgpd: Remove private AS numbers if local-as is defined
| * | bgpd: Remove private AS numbers if local-as is definedDonatas Abraitis2019-03-2610-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | When using remove-private-AS together with local-as aspath_remove_private_asns() is called before bgp_packet_attribute(). In this case, private AS will always appear in front of change_local_as. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | lib: remove event_counter.[ch]Quentin Young2019-04-031-1/+0
| |/ |/| | | | | | | | | goodbye spooky code Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #4015 from opensourcerouting/topotests-fixesMark Stapp2019-03-282-20/+17
|\ \ | | | | | | topotests: fix missing log file and duplicated output folder
| * | topotests/lib: fix router specific log outputRafael Zalamena2019-03-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change the router log output to the previous folder so it doesn't get erased when starting the old API (unbreaks command/output logging on Topogen). Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
| * | topotests/lib: fallback topology logdir if none was configuredRafael Zalamena2019-03-251-18/+15
| | | | | | | | | | | | | | | | | | | | | `param.get` always evaluates the second argument and it was causing two log directories being created for topologies using Topogen. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | | topotests: Add a bit more useful debugging to ldp-vpls-topo1Donald Sharp2019-03-273-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | When something goes wrong with this test, having these turned on will help us debug zebra processing a bit better in the future without having to modify anything else. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | topotests: pim-basic: fix some rough edgesRafael Zalamena2019-03-206-53/+51
| | | | | | | | | | | | | | | | | | | | | Move daemon configuration to appropriated files and use `json_cmp` to assert the values we expect. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | | Add code to test some very basic pim functionalityDonald Sharp2019-03-209-0/+342
|/ / | | | | | | | | | | | | | | | | | | Add code to send a S,G stream and make sure the RP see's it. Add code to send a *,G report and make sure the RP see's it. This is just some *very* basic functionality testing to ensure that we don't break anything basic. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | tests: point topotests docker img to new locationQuentin Young2019-03-192-3/+3
| | | | | | | | | | | | | | The topotests docker image has moved from frrouting/frr to frrouting/topotests. Update accordingly. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #3920 from AkhileshSamineni/show_bgp_ipv6_summary_fix_masterDonald Sharp2019-03-151-1/+1
|\ \ | | | | | | bgpd: Incorrect number of peers count in "show bgp ipv6 summary" output
| * | bgpd: Incorrect number of peers count in "show bgp ipv6 summary outputAkhilesh Samineni2019-03-071-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "show bgp ipv6 summary" output displays incorrect number of peers count. sonic# show bgp ipv6 summary IPv6 Unicast Summary: BGP router identifier 10.1.0.1, local AS number 65100 vrf-id 0 BGP table version 0 RIB entries 0, using 0 bytes of memory Peers 5, using 103 KiB of memory Peer groups 1, using 64 bytes of memory Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2003::1 4 65099 0 0 0 0 0 never Active 2088::1 4 65100 0 0 0 0 0 never Active 3021::2 4 65100 0 0 0 0 0 never Active Total number of neighbors 3 sonic# In the above output, the peers count displays as 5 but the actual peer count is 3, i.e.. 3 neighbors are activated in ipv6 unicast address family. Displayed peer count (5) is the number of the neighbors activated in a BGP instance. Fix : Now the peers count displays the number of neighbors activated per afi/safi. After Fix: sonic# show bgp ipv6 summary IPv6 Unicast Summary: BGP router identifier 10.1.0.1, local AS number 65100 vrf-id 0 BGP table version 0 RIB entries 0, using 0 bytes of memory Peers 3, using 62 KiB of memory Peer groups 1, using 64 bytes of memory Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 2003::1 4 65099 0 0 0 0 0 never Active 2088::1 4 65100 0 0 0 0 0 never Active 3021::2 4 65100 0 0 0 0 0 never Active Total number of neighbors 3 sonic# Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
* | topotests: add new bfd topology with IPv6Rafael Zalamena2019-03-1228-0/+986
| | | | | | | | | | | | | | | | New BFD topology using IPv6 and multi hop peer to cover more daemon features. This topology also tests BFD integration with BGP, OSPF and OSPF6. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | *: use array_size instead of raw divisionQuentin Young2019-02-264-7/+6
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: return bool from boolean functionsQuentin Young2019-02-261-1/+1
|/ | | | | | Not 1 or 0. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: Rename backet to bucketTim Bray2019-02-251-4/+4
| | | | | | Presume typo from original author Signed-off-by: Tim Bray <tim@kooky.org>
* Merge pull request #3777 from donaldsharp/topotest_all_routesDavid Lamparter2019-02-183-0/+77
|\ | | | | topotests: Add code to ensure routes are as expected
| * topotests: Add code to ensure routes are as expectedDonald Sharp2019-02-113-0/+77
| | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #3622 from mjstapp/fix_cpp_compileDonald Sharp2019-02-133-0/+119
|\ \ | | | | | | libs, daemons: changes to permit c++ compilation
| * | tests: add C++ header compatibility smoke testDavid Lamparter2019-02-123-0/+119
| |/ | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #3753 from LabNConsulting/working/master/topotest-l3mdev=1Donald Sharp2019-02-132-7/+11
|\ \ | | | | | | topotest: bgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdev
| * | bgp_l3vpn_to_bgp_vrf: verify TCP l3mdev set as expectedLou Berger2019-02-072-5/+9
| | | | | | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
| * | bgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdevLou Berger2019-02-071-2/+2
| | | | | | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
* | | eigrpd: Do not redelete the eigrp interface data structureDonald Sharp2019-02-112-0/+11
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | 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>
* | zebra: Update zserv debug messages to give a bit more useful infoDonald Sharp2019-02-101-0/+4
|/ | | | | | | | | | 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>
* doc: move topotests docs to developers guideQuentin Young2019-02-054-1045/+1339
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* eigrpd: Modify code to pass down metric to zebraDonald Sharp2019-02-034-13/+12
| | | | | | | | 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>
* build: fix a whole bunch of *FLAGSDavid Lamparter2019-01-301-2/+5
| | | | | | | | | - 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>
* bgpd: interface based peers should automatically override it's peer groupDonald Sharp2019-01-261-1/+1
| | | | | | | | 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>
* Treewide: use ANSI function definitionsRuben Kerkhof2019-01-246-11/+11
| | | | Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
* topotests: Modify bgp convergence to be more than 120 secondsDonald Sharp2019-01-231-1/+1
| | | | | | | | | | 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>
* bgp_rfapi_basic_sanity_config2: delayed timeouts not supported without VNC attrLou Berger2019-01-073-3/+3
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* bgp_rfapi_basic_sanity: delayed timeouts not supported without VNC attrLou Berger2019-01-073-3/+3
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* Merge pull request #3499 from donaldsharp/topotest_inheritanceRafael Zalamena2018-12-201-27/+38
|\ | | | | Topotest inheritance
| * topotests: add FreeBSDRouter abstractionDonald Sharp2018-12-171-2/+12
| | | | | | | | | | | | | | | | | | 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>
| * topotests: Move linux specific config into Linux config sectionDonald Sharp2018-12-171-11/+9
| | | | | | | | | | | | | | | | 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>
| * topotests: Make 'LinuxRouter' a class of 'Router'Donald Sharp2018-12-171-16/+19
| | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #3279 from adharkar/frr-default_localMartin Winter2018-12-185-0/+133
|\ \ | |/ |/| bgpd: Display default local preference and local AS for BGP show commands
| * bgp: new topotest BGP templates to display default local preference and ↵Ameya Dharkar2018-12-055-0/+133
| | | | | | | | | | | | | | | | 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>
* | topotests: Allow sharpd to be used in topotestsDonald Sharp2018-12-171-1/+1
| | | | | | | | | | | | | | 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>
* | topotests: module_present should return a True/FalseDonald Sharp2018-12-171-2/+2
| | | | | | | | | | | | The recent change to module_present accidently didn't return anything. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | topotests: Start abstraction of module_present for other platformsDonald Sharp2018-12-151-1/+10
| | | | | | | | | | | | | | 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>
* | topotests: Cleanup diagnose_env to allow thought about multi-platformsDonald Sharp2018-12-151-1/+12
| | | | | | | | | | | | | | | | | | | | | | 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>
* | topotests: Add a basic route leak vrf testDonald Sharp2018-12-124-0/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | tests/topotests: Pull docker image from registryChristian Franke2018-12-102-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | lib, tests: add support for keyless YANG listsRenato Westphal2018-12-091-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge pull request #3452 from opensourcerouting/reprobuild-masterDonald Sharp2018-12-092-0/+3
|\ \ | | | | | | [master] build reproducibility