summaryrefslogtreecommitdiffstats
path: root/tests/.gitignore (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: Ignore test_darr for gitDonatas Abraitis2023-07-081-0/+1
| | | | | | This file is generated after `make check`. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* tests: new grpc topotestChristian Hopps2022-03-141-0/+2
| | | | Signed-off-by: Christian Hopps <chopps@labn.net>
* tests: fuzzing target for zlog_5424 codeDavid Lamparter2022-01-171-0/+1
| | | | | | | This just tries logging messages in random ways to allow the fuzzer to do its thing and try to find weird edge cases. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: add c-ares "exercise" toolDavid Lamparter2021-11-081-0/+1
| | | | | | | This can't really be run as part of CI, it's intended as a helper instead, to use manually after poking around in the c-ares binding code. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: add tests missed in .gitignoreDavid Lamparter2021-10-191-0/+2
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests/lib: add a simple prefix list query toolDavid Lamparter2021-07-061-0/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: Add unit test for lua encoders/decodersDonald Lee2021-06-221-0/+1
| | | | Signed-off-by: Donald Lee <dlqs@gmx.com>
* tests: Add unit test for lua scriptingDonald Lee2021-06-221-0/+1
| | | | Signed-off-by: Donald Lee <dlqs@gmx.com>
* tests: fix missing gitignore entryIgor Ryzhov2021-05-171-0/+1
| | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* lib: rework how we "override" assert()David Lamparter2021-05-021-1/+2
| | | | | | | | | | | 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>
* tests: add unit test for xrefsDavid Lamparter2021-02-011-0/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* tests: add test for labelmanager pluginPat Ruddy2021-01-051-0/+1
| | | | | | | | | | | | An external label manager plugin may want to use the following functions: - create_label_chunk - assign_label_chunk - delete_label_chunk - release_label_chunk This test ensures that they are externally visible. Signed-off-by: Pat Ruddy <pat@voltanet.io>
* tests, isisd: add IS-IS SPF unit testsRenato Westphal2020-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | Now that the IS-IS SPF code is more modular, write some unit tests for it. This commit includes a new test program called "test_isis_spf" which can load any test topology (there are 13 different ones available) and run SPF on any desired node. In the future this same test program and topologies will also be used to test reverse SPF and TI-LFA. The "test_common.c" file contains helper functions used to parse the topology descriptions from "test_topologies.c" into LSP databases that can be used as an input to the SPF code. This commit also introduces the F_ISIS_UNIT_TEST flag which is used to prevent the IS-IS code from scheduling any event when running under the context of an unit test. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* lib: add frr_version_cmp()David Lamparter2019-12-061-0/+1
| | | | | | This just compares 2 version strings. Signed-off-by: David Lamparter <equinox@diac24.net>
* tests: add prefix2str testQuentin Young2019-06-131-0/+1
| | | | | | Only tests IPv4 and IPv6 right now. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* tests: exercise frr_inet_ntop()David Lamparter2019-06-061-0/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* tests: exercise printfrr()David Lamparter2019-06-031-0/+1
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* tests: exercise the typesafe list wrappersDavid Lamparter2019-04-271-0/+1
| | | | | | | | Since all of these list implementations provide almost the same API, we can run and validate them against the same test code. 9 tests for the price of one! Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: atomlist & atomsortDavid Lamparter2019-04-271-0/+1
| | | | | | | | These two are lock-free linked list implementations, the plain one is primarily intended for queues while the sorted one is for general data storage. Signed-off-by: David Lamparter <equinox@diac24.net>
* lib: add "seqlock" wait/broadcast primitiveDavid Lamparter2019-04-181-0/+1
| | | | | | | | | | Manually tested rather extensively in addition to included unit tests, should work as intended. NB: The OpenBSD futex() code is "future"; it's not actually in OpenBSD (yet?) and thus untested. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: add C++ header compatibility smoke testDavid Lamparter2019-02-121-0/+1
| | | | | | | | | | 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>
* lib, tests: major rework in the operational-data callbacksRenato Westphal2018-11-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The northbound infrastructure for operational data was subpar compared to the infrastructure for configuration data. This commit addresses most of the existing problems, making it possible to write operational-data callbacks for more complex YANG models. Summary of the changes: * Add support for nested YANG lists. * Add support for leaf-lists. * Add support for leafs of type "empty". * Introduce the "show yang operational-data XPATH" command, and write an unit test for it. The main purpose of this command is to make it easier to test the operational-data northbound callbacks. * Introduce the nb_oper_data_iterate() function, that can be used to iterate over operational data. Make the CLI and sysrepo use this function. * Since ConfD has a very peculiar API, it can't reuse the nb_oper_data_iterate() like the other northbound clients. In this case, adapt the existing ConfD callbacks to support the new features (and make some performance improvements in the process). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Merge pull request #3051 from mitch-skiba/addpath_change_V1Donald Sharp2018-11-131-3/+4
|\ | | | | Addpath - Reuse IDs
| * bgpd: Re-use TX Addpath IDs where possibleMitch Skiba2018-11-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this patch is to address a concerning behavior of tx-addpath-bestpath-per-AS. Prior to this patch, all paths' TX ID was pre-determined as the path was received from a peer. However, this meant that any time the path selected as best from an AS changed, bgpd had no choice but to withdraw the previous best path, and advertise the new best-path under a new TX ID. This could cause significant network disruption, especially for the subset of prefixes coming from only one AS that were also communicated over a bestpath-per-AS session. The patch's general approach is best illustrated by txaddpath_update_ids. After a bestpath run (required for best-per-AS to know what will and will not be sent as addpaths) ID numbers will be stripped from paths that no longer need to be sent, and held in a pool. Then, paths that will be sent as addpaths and do not already have ID numbers will allocate new ID numbers, pulling first from that pool. Finally, anything left in the pool will be returned to the allocator. In order for this to work, ID numbers had to be split by strategy. The tx-addpath-All strategy would keep every ID number "in use" constantly, preventing IDs from being transferred to different paths. Rather than create two variables for ID, this patch create a more generic array that will easily enable more addpath strategies to be implemented. The previously described ID manipulations will happen per addpath strategy, and will only be run for strategies that are enabled on at least one peer. Finally, the ID numbers are allocated from an allocator that tracks per AFI/SAFI/Addpath Strategy which IDs are in use. Though it would be very improbable, there was the possibility with the free-running counter approach for rollover to cause two paths on the same prefix to get assigned the same TX ID. As remote as the possibility is, we prefer to not leave it to chance. This ID re-use method is not perfect. In some cases you could still get withdraw-then-add behaviors where not strictly necessary. In the case of bestpath-per-AS this requires one AS to advertise a prefix for the first time, then a second AS withdraws that prefix, all within the space of an already pending MRAI timer. In those situations a withdraw-then-add is more forgivable, and fixing it would probably require a much more significant effort, as IDs would need to be moved to ADVs instead of paths. Signed-off-by Mitchell Skiba <mskiba@amazon.com>
* | tests: Verify correct operation of lsp_build_list_nonzero_htChristian Franke2018-11-121-0/+1
|/ | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* *: cleanup .gitignore filesDavid Lamparter2018-09-081-18/+0
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* build: non-recursive testsDavid Lamparter2018-09-081-1/+1
| | | | | | May SUBDIRS rest in pieces... er, peace. Signed-off-by: David Lamparter <equinox@diac24.net>
* tests: add test_bgp_table to gitignoreMark Stapp2018-07-131-0/+1
| | | | Signed-off-by: Mark Stapp <mjs@voltanet.io>
* Merge pull request #2304 from ppmathis/enhancement/bgp-pg-overridesQuentin Young2018-06-051-0/+1
|\ | | | | bgpd: Add proper support for overriding peer-group AF-flags/filters
| * tests: Add tests for overriding BGP peer attrsPascal Mathis2018-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces unit tests for BGP peer attributes and checks all three involved components, which are: - CLI Configuration Input: The appropriate commands to configure the attribute on either a peer or peer-group are being executed the same way an end user would do it. - CLI Configuration Output: The output of 'show running-config' is being checked for presence/absence of expected configuration strings. - Internal Data Structures: The internal data structures for maintaining flag/filter states (value + override + invert) are being checked after each operation to ensure the override has been implemented properly. All attributes to be tested must be defined within the 'peer_attrs' structure, which contains all peer attributes as of today and checks them with both IPv4 Unicast and IPv6 Unicast. More address families are supposed to be introduced at a later point in time. Each attribute is being checked in its own 'clean' BGP environment, so everything gets reset after each attribute to avoid any weird edge cases. The 'correct' BGP startup and shutdown routine was taken from 'bgp_main.c' to ensure that we are not leaking any memory or acting different than the real 'bgpd' would do. Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
* | tests: add pytest cache to gitignoreChristian Franke2018-05-281-0/+1
|/
* lib: add DFS + DOT dumping to graph datastructureQuentin Young2018-04-191-0/+2
| | | | | | | | * Add general-purpose DFS traversal code * Add ability to dump any graph to DOT language * Add tests for graph datastructure Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* tests: update gitignoreChristian Franke2018-03-051-0/+4
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* tests: verify isis_vertex_queue correctnessChristian Franke2017-09-221-0/+1
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* tests: add ZeroMQ testDavid Lamparter2017-08-281-0/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: ignore .dirstampQuentin Young2017-08-091-1/+0
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* isisd: add new tlv parserChristian Franke2017-08-031-0/+2
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* tests: ospf6d: basic LSDB testsDavid Lamparter2017-07-111-0/+1
| | | | | | | | | | Needed these while rewriting LSDB iteration. NB: this commit fails because of a bug in ospf_lsdb_get_next, which will SEGV when the LSDB is actually empty. Whooo... (this is fixed in the following commits.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: add table generatorQuentin Young2017-06-161-0/+1
| | | | | | | | | Allows for easy preparation of tabular output. Supports: -- Padding -- Alignment -- Styling
* tests: add pytest testrunnersChristian Franke2017-02-081-0/+4
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* tests: reorganize tests hierarchicallyChristian Franke2017-02-081-23/+23
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* tests: add CLI dummy command-exec toolDavid Lamparter2016-06-031-0/+1
| | | | | | | | | | | | This adds some common CLI testtool code as well as a tool that has a bunch of commands to be poked for their correct processing. The tool doesn't work correctly from a script at stdin at this point because the vty code will throw away all buffered when it sees EOF, so the tail end of the input file is lost. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit db93eec18d8f1e840b32ba2cdf8baf2510f6e1a5)
* tests: Add tests for timersChristian Franke2014-04-221-0/+2
| | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: add a test program for lib/command.cChristian Franke2014-04-011-0/+2
| | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: fix backtraces broken by 837d16c...David Lamparter2014-03-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 837d16c ("*: use array_size() helper macro") accidentally changed one of the expressions in the backtrace code, which afterwards read: zlog_backtrace_sigsafe(): if (((size = backtrace(array,array_size(array)) <= 0) || which boils down to: (size = backtrace(...) <= 0). The braces were intended to go: (size = backtrace(...)) <= 0. All in all, this makes a nice textbook example of the original author being too clever (trying to save a single line by pulling the assignment into the condition) and the next person touching the code tripping over it... This code occurs another time in zlog_backtrace() where it is actually correct. Pulling out the assignment nonetheless. Also, new test program. Cc: Andrew J. Schorr <ajschorr@alumni.princeton.edu> Cc: Balaji.G <balajig81@gmail.com> Cc: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* zebra: rework recursive route resolutionChristian Franke2013-09-191-0/+1
| | | | | | | | | | | | | | | Change the datastructure for recursive routes. This brings the following benefits: By using struct nexthop also to store nexthops obtained by recursive resolution, we can get rid of quite a bit of code duplication in the fib management. (rt_netlink, rt_socket, ...) With the new datastructure we can make use of all available paths when recursive routes are resolved with multipath routes. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: add DejaGNU frameworkDavid Lamparter2013-04-141-0/+5
| | | | | | | | | DejaGNU seems to be the 'standard' GNU test framework (which by itself doesn't say much), but it seems relatively usable and the "remote system" capabilities might come in handy for virtualisation-based tests for kernel interactions or something. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: update .gitignore for all test programsLeonid Rosenboim2013-01-161-5/+14
|
* lib/table: add route_table_get_next() and iteratorAvneesh Sachdev2012-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/table.[ch] - Add a function (route_table_get_next()) to get the route_node in a tree that succeeds a given prefix in iteration order. This allows one to reliably walk nodes in a tree while allowing modifications, and is useful for achieving scale and performance. Other approaches are also possible -- the main plus point of this one is that it does not require any state about the walk to be maintained in the table data structures. - Add an iterator for walking the nodes in a tree. This introduces a new structure (route_table_iter_t) and the following main functions. route_table_iter_init() route_table_iter_pause() route_table_iter_next() route_table_iter_cleanup() The iterator normally uses node pointers and the existing route_next() function to walk nodes efficiently. When an iteration is 'paused' with route_table_iter_pause(), it stores the last prefix processed. The next call to route_table_iter_next() transparently invokes route_table_get_next() with the prefix to resume iteration. * bgpd/bgp_table.[ch] Add wrappers for the new table features described above. * tests/table_test.c Add tests for the new table code. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* [administrivia] Git should ignore backup files and .loT filesPaul Jakma2008-08-221-0/+3
|