]>
git.puffer.fish Git - matthieu/frr.git/log
Rafael Zalamena [Thu, 9 Nov 2017 19:37:24 +0000 (17:37 -0200)]
topotest: specify why we are waiting
This shows the user why the router teardown is taking 2 seconds long.
Rafael Zalamena [Thu, 9 Nov 2017 19:35:01 +0000 (17:35 -0200)]
doc: update README and add code snippets
Add some pointers in the README documentation that might help users get
ready to use topotest.
Rafael Zalamena [Wed, 8 Nov 2017 18:23:14 +0000 (16:23 -0200)]
topotest/topogen: demote some messages level
The messages level of this commit were downgraded because some of them
happen on 'non-error' situations. This should help diminish the error
log verbosity on the CI-system run.
Rafael Zalamena [Tue, 7 Nov 2017 23:17:15 +0000 (21:17 -0200)]
topotest: fix a regression in version_cmp
It was found a regression on an edge case when the second number in the
comparison was (at least) 2 numbers longer the comparison would fail
with a wrong return value. It succeeded for some cases because the
first comparison in the exception was correct, but not the second.
Martin Winter [Tue, 7 Nov 2017 22:37:09 +0000 (14:37 -0800)]
bgp-ecmp-topo1: Workaround for version check
temp workaround for Issue #43
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Wed, 1 Nov 2017 09:18:56 +0000 (02:18 -0700)]
ldp-vpls-topo1: Allow ospf neighbor json command with list (new) and dict (old)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Rafael Zalamena [Tue, 31 Oct 2017 16:11:11 +0000 (14:11 -0200)]
ldp-vpls-topo1: fix a json_cmp result assert
Use the 'right' assert to show more detailed failure report and remove
a unused variable.
Martin Winter [Thu, 26 Oct 2017 00:56:33 +0000 (17:56 -0700)]
Fix output to allow it on generic Debian
- Generic Debian only has a single space in front of “proto” in the linux shell routing outptu
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Rafael Zalamena [Tue, 17 Oct 2017 20:06:25 +0000 (18:06 -0200)]
eigrp-topo1: solve output ordering problem
Transform 'show ip eigrp topo' output into data structures and compare
using json_cmp() to avoid expecting output order.
Renato Westphal [Fri, 22 Sep 2017 12:51:58 +0000 (09:51 -0300)]
ldp-topo1: Remove check for protocol in installed LSPs
PR #1213 in FRR changed the protocol of installed LSPs. To avoid breaking
older outstanding Pull Requests, remove the protocol check.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Martin Winter [Thu, 21 Sep 2017 03:31:25 +0000 (20:31 -0700)]
eigrp-topo1: Remove check for EIGRP distance
- Distance used to be wrong (0), new commit fixes this (90). To avoid breaking older outstanding Pull Requests, remove the distance check
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Rafael Zalamena [Tue, 19 Sep 2017 01:19:10 +0000 (22:19 -0300)]
topotest: improve json error messages
Show a diff of the JSON values instead of dumping the whole
data structures.
Rafael Zalamena [Tue, 19 Sep 2017 20:05:07 +0000 (17:05 -0300)]
topotest: json_cmp_result split error lines
When the API user wanted to show newlines we have to break them manually
to get the propper format.
Rafael Zalamena [Wed, 20 Sep 2017 15:04:23 +0000 (12:04 -0300)]
topotest: allow passing options to difflib
Extend the topotest diff functions to allow receiving difflib options.
Rafael Zalamena [Tue, 19 Sep 2017 01:14:27 +0000 (22:14 -0300)]
topotest: remove unused json_cmp unused parameter
Martin Winter [Tue, 19 Sep 2017 01:26:59 +0000 (18:26 -0700)]
all-protocol-startup/isis: Fix check for "show isis interface" to allow different circuit ids than 1
Rafael Zalamena [Wed, 13 Sep 2017 15:22:14 +0000 (12:22 -0300)]
topogen: fix diagnostics failure
Don't try to log to file if directory doesn't exist.
Rafael Zalamena [Wed, 13 Sep 2017 15:07:35 +0000 (12:07 -0300)]
topogen: save zebra version output
Keep the zebra version output for later problem diagnostics.
Rafael Zalamena [Wed, 13 Sep 2017 14:57:58 +0000 (11:57 -0300)]
topogen: log diagnostics to file
Martin Winter [Tue, 12 Sep 2017 23:51:54 +0000 (16:51 -0700)]
eigrp-topo1: Cleanup leftover comments from previous commit
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Tue, 12 Sep 2017 23:36:38 +0000 (16:36 -0700)]
eigrp-topo1: Change Route verification to use json
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Thu, 31 Aug 2017 00:21:29 +0000 (17:21 -0700)]
all-protocol-starup: Fix triple-output of same vtysh stderr/stdout messages.
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Thu, 31 Aug 2017 00:06:35 +0000 (17:06 -0700)]
lib: Use SIGTERM for killing daemons first and only SIGBUS (7) if the daemons fail to exit.
- This allows daemons to free up memory and avoid false memory leak reports
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Thu, 31 Aug 2017 00:03:54 +0000 (17:03 -0700)]
multiple_topos: Don't report about StdErr Output if there is no output
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Donald Sharp [Sun, 27 Aug 2017 00:08:06 +0000 (20:08 -0400)]
eigrp-topo1: Correct eigrp test results.
The values saved for the route table and eigrp topo
were a bit off because they have been corrected
in the eigrp daemon
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Martin Winter [Sun, 20 Aug 2017 07:12:30 +0000 (00:12 -0700)]
Enable eigrp-topo1
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Sun, 20 Aug 2017 06:37:17 +0000 (23:37 -0700)]
lib: check for eigrpd available and return warning if missing instead of failing
Rafael Zalamena [Thu, 17 Aug 2017 18:19:46 +0000 (15:19 -0300)]
eigrp-topo1: convert to topogen
Rafael Zalamena [Thu, 17 Aug 2017 18:18:18 +0000 (15:18 -0300)]
topogen: add support for eigrpd and nhrp
Rafael Zalamena [Tue, 22 Aug 2017 22:26:18 +0000 (19:26 -0300)]
topogen: router startup failure triggers errors
Makes `router_have_failure()` detect frr startup errors.
Rafael Zalamena [Tue, 22 Aug 2017 22:25:15 +0000 (19:25 -0300)]
topogen: treat some corner cases on vtysh failure
Don't throw unneeded tracebacks when 'show version' doesn't show us what
we expect, instead gracefully fail.
Rafael Zalamena [Tue, 22 Aug 2017 22:24:16 +0000 (19:24 -0300)]
topogen: show pretty output for skipped messages
Format them properly instead of printing a dictionary.
Rafael Zalamena [Tue, 22 Aug 2017 22:22:53 +0000 (19:22 -0300)]
ldp_vpls_topo1: set an error instead of exit
It will have the same effect and code will not have to be repeated since
all functions must call `routers_have_failure()`.
Renato Westphal [Tue, 15 Aug 2017 19:31:20 +0000 (16:31 -0300)]
ldp_vpls_topo1: don't use pytest.mark.skipif
This feature from pytest can not be used to detect runtime errors.
Also, remove test_router_running() since all tests should actually check
if all daemons are up and running.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Tue, 15 Aug 2017 19:30:30 +0000 (16:30 -0300)]
ldp_vpls_topo1: skip all tests on stable/2.0
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Thu, 13 Jul 2017 05:25:06 +0000 (02:25 -0300)]
ldp_vpls_topo1: add new topology for ldp pseudowires
This is a very simple topology for testing LDP pseudowires.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Donald Sharp [Fri, 18 Aug 2017 19:37:24 +0000 (15:37 -0400)]
Basic EIGRP topo test working
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 16 Aug 2017 23:22:22 +0000 (19:22 -0400)]
Exclude eigrp test from running normally yet
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 16 Aug 2017 23:10:52 +0000 (19:10 -0400)]
Add a basic EIGRP topology.
Nothing fancy here, just add 3 routers in a row
attempt to let eigrp come up and start a mininet
xterm to debug, since eigrp doesn't work yet.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 16 Aug 2017 22:57:59 +0000 (18:57 -0400)]
Allow topotests to work with eigrp and nhrp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Martin Winter [Wed, 9 Aug 2017 19:23:54 +0000 (12:23 -0700)]
ldp-topo1: Use 'label implicit-null' for implicit labels
Signed-off-by: Martin Winter <mwinter@netdef.org>
David Lamparter [Wed, 9 Aug 2017 17:08:50 +0000 (19:08 +0200)]
topotests: change from "context" to "unified" diff
context diff:
*** before.py
Rafael Zalamena [Fri, 28 Jul 2017 00:44:51 +0000 (21:44 -0300)]
topotests: add topology name to assert output
Make it easy to identify which topology test we are running.
Rafael Zalamena [Thu, 27 Jul 2017 17:52:51 +0000 (14:52 -0300)]
topotests: make asserts show up in stderr
Code was based on the pytest default makereport code:
https://github.com/pytest-dev/pytest/blob/
c92760dca8637251eb9e7b9ea4819b32bc0b8042 /_pytest/runner.py#L264
Martin Winter [Thu, 27 Jul 2017 11:09:45 +0000 (04:09 -0700)]
lib: Change topology to output INFO and DEBUG to stdout and other levels to stderr
Previously, all logs were sent to stderr
Martin Winter [Thu, 27 Jul 2017 00:27:24 +0000 (17:27 -0700)]
lib: add check for mpls kernel modules to diagnose_env()
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Wed, 26 Jul 2017 23:22:14 +0000 (16:22 -0700)]
lib: Enhance daemon_available() function to check for mpls modules in case of LDPd
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Wed, 26 Jul 2017 20:37:39 +0000 (13:37 -0700)]
lib: Add check for MPLS kernel modules to exist before trying LDP tests
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Wed, 26 Jul 2017 19:22:25 +0000 (12:22 -0700)]
ospf-topo1: Remove check for spfLastDurationMsecs value
json check accidently checked for the spfLastDurationMsecs which
isn't always 0 for slower system in our tests. ARM7 sometimes has
a slightly higher value (1).
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Wed, 26 Jul 2017 02:21:05 +0000 (19:21 -0700)]
bgp-ecmp-topo1: Check number of routes received for convergence
Add check for number of routes to convergence. InQ=0, OutQ=0
together with correct number of routes received shows that
BGP has converged
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Rafael Zalamena [Mon, 24 Jul 2017 17:01:00 +0000 (14:01 -0300)]
bgp-ecmp-topo: add support for FRR 2.0
The FRR 2.0 json output is different from newer version, so add the
appropriate treatment.
Rafael Zalamena [Mon, 24 Jul 2017 16:06:52 +0000 (13:06 -0300)]
bgp-ecmp-topo: test BGP convergence
Add a test that waits for BGP convergence.
Rafael Zalamena [Mon, 24 Jul 2017 14:55:42 +0000 (11:55 -0300)]
bgp-ecmp-topo: use the new sleep function
Rafael Zalamena [Mon, 24 Jul 2017 14:53:19 +0000 (11:53 -0300)]
topotest: log sleep function
Added a wrapper for the sleep function that should be used to register
in the log files the amount of time spent sleeping.
Rafael Zalamena [Thu, 13 Jul 2017 12:54:37 +0000 (09:54 -0300)]
bgp-ecmp-topo1: add convergence test
Assert that we got the routes from ExaBGP and they are multipath
enabled.
Rafael Zalamena [Wed, 12 Jul 2017 14:38:31 +0000 (11:38 -0300)]
bgp-ecmp-topo1: convert to topogen
Rafael Zalamena [Mon, 10 Jul 2017 15:58:24 +0000 (12:58 -0300)]
bgp-ecmp-topo1: fix exabgp configuration file
Using relative path to start the exabgp python scripts didn't work out
of the box in my enviroment, so be more specific since we already know
where the scripts are.
Martin Winter [Fri, 7 Jul 2017 09:49:55 +0000 (02:49 -0700)]
bgp-ecmp-topo1: Add BGP Topology for rcmp testing
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Sat, 22 Jul 2017 01:32:48 +0000 (18:32 -0700)]
ospf-topo: Mask IPv6 local-addressess instead of removing them
Just mask out the random part makes the diff output better readable
Rafael Zalamena [Fri, 21 Jul 2017 14:08:06 +0000 (11:08 -0300)]
ospf-topo: show areas in the topology dot/jpg
Rafael Zalamena [Fri, 21 Jul 2017 13:53:36 +0000 (10:53 -0300)]
ospf-topo: skip on tests on router failure
Update the test by adding the routers_have_failure() check. While here,
bump the amount of time to expect for convergence by 15 seconds.
Rafael Zalamena [Fri, 21 Jul 2017 13:33:50 +0000 (10:33 -0300)]
ospf-topo: remove log file specification
We don't need to set logging file per-daemon as topogen will already do
that for us. Also, remove hostname line as it seems to have no effect.
Rafael Zalamena [Fri, 21 Jul 2017 13:32:14 +0000 (10:32 -0300)]
topogen: allow daemon spec in vtysh_cmd
Allow commands to be run per-daemon basis. While here make daemon
logging file configuration per-daemon.
Rafael Zalamena [Mon, 3 Jul 2017 19:04:47 +0000 (16:04 -0300)]
ospf: test route kernel installation
Added tests to validate that OSPF routes are being installed/uninstalled
in the Linux kernel.
Rafael Zalamena [Mon, 3 Jul 2017 18:57:20 +0000 (15:57 -0300)]
topotest: implement 'ip route' functions
Implement an abstraction to the commands 'ip route' to get the node
current routing table state.
Rafael Zalamena [Fri, 30 Jun 2017 19:23:25 +0000 (16:23 -0300)]
ospf: add IPv6 OSPF convergence test
Add more tests to the ospf-topo1 to include IPv6 testing. Since both IP
versions are running together, there is no need to wait OSPF convergence
per IP version.
Rafael Zalamena [Thu, 29 Jun 2017 21:00:38 +0000 (18:00 -0300)]
ospf: add some log calls to show activity
Brings the OSPF test closer to other topotest tests.
Rafael Zalamena [Wed, 28 Jun 2017 18:30:59 +0000 (15:30 -0300)]
ospf: add 'show ip ospf json' test
Test the default values of 'show ip ospf json' output in the current
topology.
Rafael Zalamena [Thu, 22 Jun 2017 19:07:13 +0000 (16:07 -0300)]
ospf: add memory leak test
Standard memory leak test/report.
Rafael Zalamena [Wed, 21 Jun 2017 21:08:00 +0000 (18:08 -0300)]
ospf: added a convergence test for link failure
This new test simulates a link failure in router 3 and expects the OSPF
routing table to converge accordingly in all nodes.
Rafael Zalamena [Mon, 19 Jun 2017 19:18:25 +0000 (16:18 -0300)]
ospf: added convergence test for IPv4
Added a convergence test for OSPF (IPv4) using the new topology
builder Topogen.
Rafael Zalamena [Thu, 20 Jul 2017 13:54:38 +0000 (10:54 -0300)]
topotests: make 'quagga' check optional
Only check for quagga directories and binaries when we don't find FRR.
Also fix a copy-paste error in warning message.
Rafael Zalamena [Tue, 18 Jul 2017 19:44:58 +0000 (16:44 -0300)]
topotest: simplify ldp kernel check
Use version_cmp() instead of hand rolling its own parser.
Rafael Zalamena [Tue, 18 Jul 2017 19:44:27 +0000 (16:44 -0300)]
topotest: implement environment diagnostics
Run environment diagnostics on topotest start, report all detected
problems and abort if an error condition is met.
Rafael Zalamena [Tue, 18 Jul 2017 19:28:52 +0000 (16:28 -0300)]
bgp_multiview_topo1: fix exabgp configuration
Allow exabgp to run on my Ubuntu 16.04 by specifying the complete path
instead of relative.
Martin Winter [Tue, 18 Jul 2017 04:14:28 +0000 (21:14 -0700)]
ldp-topo1: Make the implicit label optional to pass old frr code as well
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Sun, 16 Jul 2017 09:51:00 +0000 (02:51 -0700)]
Doc: Update README to specify ExaBGP version as 4.0 is not yet supported
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Rafael Zalamena [Fri, 14 Jul 2017 17:02:12 +0000 (14:02 -0300)]
topogen: add equipment version handling
Added helper functions to TopoRouter to test equipment version and type.
Rafael Zalamena [Fri, 14 Jul 2017 17:00:52 +0000 (14:00 -0300)]
topotest: add version comparison function
Implemented a version comparison function that tells if a version
contained in a string is greater/less/equal to another.
Rafael Zalamena [Fri, 30 Jun 2017 19:09:07 +0000 (16:09 -0300)]
topotest: add text normalization function
Standardized function that removes format spaces (or tab) and carriage
returns characters. This function is useful to allow output text
processing without breaking diff capabilities.
Output example:
*N IA 2001:db8:2::/64 :: r2-eth0 00:03:39
Becomes:
*N IA 2001:db8:2::/64 :: r2-eth0 00:03:39
If you remove 'IA' you won't have space formatting problem anymore.
Rafael Zalamena [Thu, 13 Jul 2017 12:49:37 +0000 (09:49 -0300)]
template: add router check test
Show test developers that they can check if routers are running by
calling tgen.routers_have_failure().
Rafael Zalamena [Thu, 13 Jul 2017 11:43:32 +0000 (08:43 -0300)]
topogen: handle JSON decode failures
Instead of raise()ing, return a empty dictionary.
Rafael Zalamena [Wed, 12 Jul 2017 14:38:31 +0000 (11:38 -0300)]
topogen: implement router check method
Use a standard function to do 'router running checks' instead of having
to duplicate the code in every test.
Rafael Zalamena [Wed, 12 Jul 2017 16:03:04 +0000 (13:03 -0300)]
topogen: fix topogen memleak activation
When memleak_path is present in the configuration file it means that it is
activated.
Rafael Zalamena [Wed, 5 Jul 2017 16:46:28 +0000 (13:46 -0300)]
topotest: add JSON list comparation support
Add missing list support for json_cmp(). The missing support was
noticed while writing the BGP ECMP topology test.
Rafael Zalamena [Mon, 10 Jul 2017 15:52:04 +0000 (12:52 -0300)]
topogen: add support for ExaBGP peers
Implemented basic support for ExaBGP peers.
Rafael Zalamena [Tue, 11 Jul 2017 14:10:59 +0000 (11:10 -0300)]
topogen: add error functions
Store errors and error code in topogen so other tests can look up for
failures and skip tests.
Rafael Zalamena [Mon, 10 Jul 2017 20:01:23 +0000 (17:01 -0300)]
topogen: implement start/stop methods for TopoGear
Having a generic start/stop methods for TopoGear allows TopoGen to call
start/stop for all equipments. This allows us to reduce the teardown
code by removing the necessity of having to always remember to call
each equipment clean up function.
Rafael Zalamena [Fri, 7 Jul 2017 19:01:30 +0000 (16:01 -0300)]
topogen: configure daemon logging files
Auto configure daemon logging files to the appropriated place. This
removes the responsibility from the test developer to set this in the
daemon configuration.
Rafael Zalamena [Fri, 7 Jul 2017 13:30:28 +0000 (10:30 -0300)]
template: update test template
Use the new logger and implement a default memory leak test/report.
Rafael Zalamena [Fri, 7 Jul 2017 13:18:25 +0000 (10:18 -0300)]
topogen: add per router logging
TopoRouters now create a logger (which logs to /tmp/{router_name}.log)
on start to record all commands and events that it goes through. All log
messages contain timestamps that may be used in the future to:
(1) correlate commands call with events
(2) benchmark/time command speed
Rafael Zalamena [Fri, 7 Jul 2017 12:57:07 +0000 (09:57 -0300)]
topotest: use topolog instead of print
Fix some whitespace issues while at it.
Rafael Zalamena [Fri, 7 Jul 2017 12:29:41 +0000 (09:29 -0300)]
topolog: support adding loggers during runtime
Allow topotest subsystems to create their own loggers. This will help
increase log organization and allow different settings to fit the
subsystems needs.
Rafael Zalamena [Thu, 29 Jun 2017 20:55:33 +0000 (17:55 -0300)]
topolog: implement a logging abstraction
The default logger (root) is already being used by Mininet, so to allow
customizing logging output and configuring log files Topolog was
created. Topolog is no more than a thin layer abstraction to call
logging functions without using the 'root' logger.
Martin Winter [Fri, 7 Jul 2017 01:12:05 +0000 (18:12 -0700)]
all_protocol_startup: More tolerant on interface MTU output
- Allow 'MTU mismatch detection: enabled' and 'MTU mismatch detection:enabled'
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Rafael Zalamena [Tue, 27 Jun 2017 22:40:54 +0000 (19:40 -0300)]
topogen: add memory leak report configuration
Allow memory leak to be configured from the configuration file.
Rafael Zalamena [Tue, 27 Jun 2017 21:11:02 +0000 (18:11 -0300)]
topogen: support configuration file
Use a configuration file for casual settings like:
* Verbosity level (helps when debugging mininet issues)
* Custom daemon directory (in order to support running different daemon
binaries without touching tests)
* Daemon type switch: allow running quagga without touching any test
files
Also fix the add_router() documentation to include all options.
Rafael Zalamena [Thu, 29 Jun 2017 21:23:34 +0000 (18:23 -0300)]
topotest: add writing tests tips
Add two tips to help improve test code quality:
1) Store function returns for later inspection
2) Identify what failed using the assert message
Rafael Zalamena [Thu, 29 Jun 2017 15:18:46 +0000 (12:18 -0300)]
topotest: improve json_cmp assert output
Create a specialized assert and json_cmp() result to improve the
comparison output. With this we also got a way to display all comparison
failures instead of just the first one.
Rafael Zalamena [Thu, 29 Jun 2017 13:49:11 +0000 (10:49 -0300)]
topogen: don't backtrace when topogen is not used
This allows old tests to be run with '--topology-only' without
generating tons of error messages, instead it will just stop the test
without trying anything else.