summaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib: centralized memstats-at-exitDavid Lamparter2017-08-242-2/+2
| | | | | | | | | adds a new all-daemon "debug memstats-at-exit" command. Also saves memstats to a file in /tmp, useful if a long-running daemon is having weird issues (e.g. in a user install). Fixes: #437 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: fix clippy include paths / double-buildDavid Lamparter2017-08-152-2/+2
| | | | | | | | | A mismatch between the make rule and the include path causes dependency tracking to try to build the clippy.c file twice (at the same time), which results in spurious build failures. Fixes: #971 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge remote-tracking branch 'frr/master' into tcp-zebraDavid Lamparter2017-08-094-6/+5
|\
| * Merge pull request #911 from opensourcerouting/non-recursive-2Donald Sharp2017-08-091-3/+1
| |\ | | | | | | more non-recursive build, fix cross-compile, & doc build mangling
| | * build: clean up BUILT_SOURCESDavid Lamparter2017-08-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUILT_SOURCES doesn't do what the name suggests. What it actually means is "these files should be built first when doing a 'make' without explicit target" (or "make all"). It's pretty much almost always wrong to use BUILT_SOURCES, the only correct use is when a file is needed by an unspecified / large set of files. Also remove version.h and route_types.h from dist tarball while we're at it. configure will create them anyway. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | Merge pull request #892 from opensourcerouting/watchfrr-simplifyDonald Sharp2017-08-092-2/+4
| |\ \ | | | | | | | | simplify watchfrr, add --terminal, improve startup logging
| | * | lib: privs: make uid/gid accessible before setuidDavid Lamparter2017-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits off privs_preinit(), which does the lookups for user and group IDs. This is so the init code can create state directories while still running as root. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| | * | lib: vty_stdio signal handlingDavid Lamparter2017-08-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - SIGTSTP appropriately suspends the foreground terminal - SIGINT causes the daemon to exit, regardless of -d - SIGQUIT causes the daemon to daemonize, regardless of -d Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | *: ignore .dirstampQuentin Young2017-08-091-1/+0
| | |/ | |/| | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* / | *: remove --enable-tcp-zebra, rework ZAPI pathDavid Lamparter2017-08-081-2/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds "@tcp" as new choice on the -z option present in zebra and the protocol daemons. The --enable-tcp-zebra option on configure is no longer needed, both UNIX and TCP socket support is always available. Note that @tcp should not be used by default (e.g. in an init script), and --enable-tcp-zebra should never have been in any distro package builds, because **** TCP-ZEBRA IS A SECURITY PROBLEM **** It allows arbitrary local users to mess with the routing table and inject bogus data -- and also ZAPI is not designed to be robust against attacks. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | isisd: rework complete, move "tlvs2" to "tlvs"Christian Franke2017-08-031-1/+1
| | | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | isisd: add new tlv parserChristian Franke2017-08-036-1/+217
|/ | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* tests: fix small typoRenato Westphal2017-08-012-2/+2
| | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* lib/bgpd: introduce the iana_safi_t enumRenato Westphal2017-08-011-1/+1
| | | | | | | We had afi_t/iana_afi_t for AFIs but only safi_t for SAFIs. Fix this inconsistency. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* Revert "*: reindent pt. 2"David Lamparter2017-07-228-570/+514
| | | | | | | | | This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276. clang 5 is not widely available enough for people to indent with. This is particularly problematic when rebasing/adjusting branches. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: reindent pt. 2whitespace / reindent2017-07-178-514/+570
| | | | | | | | w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
* *: reindentreindent-master-afterwhitespace / reindent2017-07-1730-5722/+6050
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests/ospf6d/test_lsdb: remove vty_outlnDavid Lamparter2017-07-141-7/+7
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge remote-tracking branch 'frr/master' into table-hash-ospf6-lsdb-refactorDavid Lamparter2017-07-1410-73/+112
|\ | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * Merge pull request #813 from opensourcerouting/newline-reduxRuss White2017-07-145-10/+10
| |\ | | | | | | newline redux
| | * Merge remote-tracking branch 'frr/master' into newline-reduxDavid Lamparter2017-07-141-1/+3
| | |\ | | | | | | | | | | | | | | | | | | | | Lots of conflicts from CMD_WARNING_CONFIG_FAILED... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| | * | *: remove VTYNL, part 6 of 6David Lamparter2017-07-141-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| | * | *: ditch vty_outln(), part 1 of 2David Lamparter2017-07-135-9/+9
| | | | | | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | Merge pull request #762 from bingen/mutiple_nh_recursive_levelsDonald Sharp2017-07-141-32/+80
| |\ \ \ | | | | | | | | | | Allow for more than 1 NH recursion level
| | * | | lib, test: Add test case for ALL_NEXTHOPS_ROßingen2017-07-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without it, tests were passing before commit 9fb47c0, so a case was missing (the one which that commit fixes). Signed-off-by: ßingen <bingen@voltanet.io>
| | * | | Rename ALL_NEXTHOPS_RO to ALL_NEXTHOPSßingen2017-07-101-4/+4
| | | | |
| | * | | Fix tests for NH multiple recursion levelsßingen2017-07-101-26/+72
| | | | | | | | | | | | | | | | | | | | | | | | | Tests were no passing. Besides, added cases to test more than 1 level depth in nexthop recursion.
| | * | | Allow for more than 1 NH recursion levelßingen2017-06-281-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, only one level of recursive resolution was supported. Signed-off-by: ßingen <bingen@voltanet.io>
| * | | | tests: update prng to return better pseudo random numbersChristian Franke2017-07-123-31/+21
| | |_|/ | |/| | | | | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
| * | | build: fix ttable testDavid Lamparter2017-07-111-1/+3
| | |/ | |/| | | | | | | | | | | | | test_ttable.refout wasn't in the dist package. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | tests: ospf6d: basic LSDB testsDavid Lamparter2017-07-116-2/+543
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | tests: fix pytest API "surprise" in skipping testsDavid Lamparter2017-07-111-2/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | pytest.mark.skipif apparently iterates through a class's methods, applying itself onto the various methods. Now, since we're deriving from a parent class, the method is actually the same object inherited from the parent, so the decorator will apply itself on the parent's testrunning method (test_refout). The result is that any TestRefout tests after "test_commands.py" will be skipped... This only became apparent after adding ospf6d/test_lsdb.py; before, test_commands.py was the last test in the list so it didn't matter... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: update hash_create(), hash_create_size()Quentin Young2017-07-021-1/+1
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | lib: more `show thread cpu`Quentin Young2017-06-3011-11/+11
| | | | | | | | | | | | | | Add support for naming pthreads. Also, note that we don't have any records yet if that's the case. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: rebase vty_outln() -> masterQuentin Young2017-06-291-4/+4
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: s/VTY_NEWLINE/VTYNL/gQuentin Young2017-06-291-1/+1
| | | | | | | | | | | | Should be able to fit more vty_out onto one line now Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: use vty_outlnQuentin Young2017-06-294-5/+5
|/ | | | | | Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #714 from opensourcerouting/cli_magic_defpyDonald Sharp2017-06-284-100/+125
|\ | | | | CLI magic: part 1 (DEFPY)
| * tests: cli: unit test DEFPY() + clidef.pyDavid Lamparter2017-06-144-100/+125
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | lib: add table generatorQuentin Young2017-06-165-1/+336
|/ | | | | | | | | Allows for easy preparation of tabular output. Supports: -- Padding -- Alignment -- Styling
* *: remove THREAD_BACKGROUNDQuentin Young2017-06-081-2/+2
| | | | | | | it's just an alias for a millisecond timer used in exactly nine places and serves only to complicate Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #537 from donaldsharp/vrf_stuffDavid Lamparter2017-05-173-3/+3
|\ | | | | Vrf stuff
| * Merge branch 'master' into vrf_stuffDonald Sharp2017-05-161-3/+5
| |\
| * | tests: Fix vrf_init to have correct callDonald Sharp2017-05-163-3/+3
| | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-1529-117/+88
| |/ |/| | | | | | | | | | | | | | | | | | | The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | lib: cli: fix IPv6 address partial matchingDavid Lamparter2017-05-151-3/+5
|/ | | | | | | | | | | | | | | | | | A partially-entered IPv6 address would never return a "partly_match", meaning some possible completions weren't listed by the matcher. This specifically breaks autocompleting BGP IPv6 neighbor addresses. Before: aegaeon# show ip bg ne 2001:<?> WORD Neighbor on BGP configured interface After: aegaeon# show ip bg ne 2001:<?> WORD Neighbor on BGP configured interface X:X::X:X Neighbor to display information about 2001:db8::2 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: update thread_add_* callsQuentin Young2017-05-092-6/+10
| | | | | | | | | | | | Pass pointer to pointer instead of assigning by return value. See previous commit message. To ensure that the behavior stays functionally correct, any assignments with the result of a thread_add* function have been transformed to set the pointer to null before passing it. These can be removed wherever the pointer is known to already be null. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: remove THREAD_ON macros, add nullity checkQuentin Young2017-05-094-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way thread.c is written, a caller who wishes to be able to cancel a thread or avoid scheduling it twice must keep a reference to the thread. Typically this is done with a long lived pointer whose value is checked for null in order to know if the thread is currently scheduled. The check-and-schedule idiom is so common that several wrapper macros in thread.h existed solely to provide it. This patch removes those macros and adds a new parameter to all thread_add_* functions which is a pointer to the struct thread * to store the result of a scheduling call. If the value passed is non-null, the thread will only be scheduled if the value is null. This helps with consistency. A Coccinelle spatch has been used to transform code of the form: if (t == NULL) t = thread_add_* (...) to the form thread_add_* (..., &t) The THREAD_ON macros have also been transformed to the underlying thread.c calls. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* tests: allow to use exit_cleanly as test methodChristian Franke2017-05-081-1/+2
| | | | | | TestMultiOut can now also just check for clean exit Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* Merge branch 'stable/2.0'David Lamparter2017-04-043-2/+21
|\ | | | | | | | | | | Fixed minor conflicts from "defaults" change on stable. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>