Commit Graph

147 Commits

Author SHA1 Message Date
Donald Sharp
a0764a368f tests: Turn on nhrpd and babeld as part of all-protocol-startup
Turn on a few more daemons to run during this test.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-23 19:44:04 -04:00
GalaxyGorilla
b3100f6ce7 tests: Fix JSON diff for nested lists
The involved piece of code is supposed to find a 'closest' match for two
JSON structures using another JSON diff. However, it can happen that
during that new diff the JSON structures are altered (elements from a
list are deleted when 'found'). This is in general ok when the deleted
element is part of the JSON structure which 'matches', but when it later
turns out that some other element of the structure doesn't fit, then the
whole structure should be recovered. This is now realized by using a
deepcopy for the besaid new JSON diff such that the original is only
altered (e.g. deleted) when the diff is clean.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-05-22 22:29:35 +00:00
Donald Sharp
6109dd7e22
Merge pull request #6293 from GalaxyGorilla/json_diff
tests: introduce a proper JSON diff for topotests
2020-05-21 14:19:44 -04:00
Kuldeep Kashyap
a5a52d6608 tests: Add library support for BGP-Graceful-Restart automation
1. Adding APIs to common_config.py to support BGP-Graceful-Restart automation
2. Adding APIs to create BGP-GR config to bgp.py
3. Adding verification API for BGP-GR functionality

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-05-04 17:15:55 +00:00
Kuldeep Kashyap
c65a7e26dc tests: Enhance topotests scripts to kill/start specific Daemons
1. Added APIs to topogen.py and topotest.py to kill/start specific Daemons,
   ex - bgpd, staticd

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2020-05-04 17:15:55 +00:00
GalaxyGorilla
849224d4ed tests: introduce a proper JSON diff for topotests
Diff'ing JSON objects is a crucial operation in the topotests for
comparing e.g. vtysh output (formatted as JSON) with a file which
covers the expectation of the tests. The current diff functionality
is 'self-written' and intended to test a JSON object d2 on being a
subset of another JSON object d1. For mismatches a diff is generated
based on a normalized textual representation of the JSON objects.

This approach has several disadvantages:

  * the human provided JSON text might not be normalized, hence
    a diff with line numbers might be worthless since it provides
    close to zero orientation what the problem is
  * the diff contains changes like commatas which are meaningless
  * the diff might contain a lot of changes about meaningless
    content which is present in d1 but not in d2
  * there is no proper functionality to test for 'equality' of
    d1 and d2
  * it is not possible to test for order, e.g. JSON arrays are
    just tested with respect to being a subset of another array
  * it is not possible to check if a key exists without also
    checking the value of that particular key

This commit attempts to solve these issues. An error report is
generated which includes the "JSON Path" to the problematic JSON
elements and also hints on what the actual problem is (e.g. missing
key, mismatch in dict values etc.).

A special parameter 'exact' was introduced such that equality can be
tested. Also there was a convention that absence of keys can be
tested using the key in question with value 'None'. This convention
is still honored such that full backwards compatiiblity is in
place.

Further order can be tested using the new tag '__ordered__' in
lists (as first element). Example:

    d1 = [1, 2, 3]
    d2 = ['__ordered__', 1, 3, 2]

Tesing d1 and d2 this way will now result in an error.

Key existence can now be tested using an asterisk '*'. Example:

    d1 = [1, 2, 3]
    d2 = [1, '*', 3]

    d1 = {'a': 1, 'b': 2}
    d2 = {'a': '*'}

Both cases will result now in a clean diff for d1 and d2.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-04-30 09:33:32 +00:00
reformat
787e762445 tests: Run python formatter (black) for topotests
Mostly ' => ", whitespace changes.

Using https://github.com/psf/black

Signed-off-by: reformat <reformat@nobody.nobody>
2020-04-03 19:41:28 +03:00
Rafael Zalamena
a6fd124a2a topotest: add new run_and_expect variant
The new `run_and_expect` variant - called `run_and_expect_type` - tests
the return value type of the test function and optionally the return
value.

Now we can implement tests from test functions that return different
return types.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-23 10:28:56 -03:00
Stephen Worley
4aaea8fb49 tests: Make checkRouterRunning() show logging
Adding in the command `show log-filter` made `show log`
ambiguous. Change the checkRouterRunning() test to do
full `show logging` so it works again.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-06-19 17:20:24 -04:00
Rafael Zalamena
04ce2b970e topotests: backward compatibility fix
Allow old topologies to use default parameters from `pytest.ini`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-06-11 14:05:48 -03:00
Mark Stapp
e394d9aa5f tests: Add ip6_route_zebra lib function
Add a common function to retrieve and canonicalize
'show ipv6 route' output for use in topotests. Use that in
the test_ospf6_topo1 test; update the corresponding 'expected'
results files to match the lib function.

Replace some 'print' with 'logger' statements in that test also.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-06-06 13:22:04 -04:00
Rafael Zalamena
0d5e41c628 topotests/lib: fallback topology logdir if none was configured
`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>
2019-03-25 14:46:16 -03:00
Donald Sharp
4b1d6d4db5 topotests: add FreeBSDRouter abstraction
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-17 10:43:27 -05:00
Donald Sharp
d29fb5bd52 topotests: Move linux specific config into Linux config section
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-17 10:38:02 -05:00
Donald Sharp
7cc96035a7 topotests: Make 'LinuxRouter' a class of 'Router'
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-17 10:33:37 -05:00
Donald Sharp
849d1ed9af topotests: Allow sharpd to be used in topotests
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-16 20:47:30 -05:00
Donald Sharp
28440fd9f8 topotests: module_present should return a True/False
The recent change to module_present accidently didn't return anything.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-12-16 20:47:30 -05:00
Donald Sharp
cc95fbd9ff topotests: Start abstraction of module_present for other platforms
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-15 10:54:11 -05:00
Lou Berger
8cd7c744df topotest: remove sleep on staticd startup
Signed-off-by: Lou Berger <lberger@labn.net>
2018-12-08 10:42:21 -05:00
Christian Franke
7fe06d5559 topotests: Update json_cmp_result to return readable result
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-04 16:13:58 +01:00
Donald Sharp
d21321142a Add a tiny breadcrumb to hopefully help end user
Add a breadcrumb for people testing to hopefully allow
them to figure out what is going wrong when they
are testing different versions of FRR using
topotests and staticd is not running because
this version of staticd needs to be cleaned up

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:14 -05:00
paco
86c21ac7fc lib, lm-proxy-topo1: label manager proxy test
Label proxy manager test covering both LDP and BGP label requests.

lib/topotest.py:restartRouter() function has been fixed in order to
allow propagating options to deamons other than zebra.

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-11-27 20:22:14 -05:00
Martin Winter
6bfe4b8bfc lib: checkRouterVersion to determine version
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
4d45d6d3b0 topogen/topotest: add support for BFDd
Allow BFDd to be configured and used.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Martin Winter
2f726781b6 lib: Add support for Ubuntu 18.04 with installed FRR package
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
0eff58207e lib: fix ip4_route_zebra header removal code
The `strip` function is actually a method of the String object.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Christian Franke
41077aa191 lib/ospf-topo1-vrf: don't compare headers of show ip route
Signed-off-by: Christian Franke <nobody@nowhere.ws>
2018-11-27 20:22:14 -05:00
Donald Sharp
a93eb16a51 lib: Always attempt to set mpls platform_labels
The code was not attempting to set the max platform_labels
on a per router basis, leaving us w/ situations where
mpls install would fail because platform_labels was 0.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:14 -05:00
Philippe Guibert
f561216813 lib: add zebra api to shutdown an interface
this function operates on vtysh, and performs a shutdown on an
interface.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Philippe Guibert
b220b3c83a lib: add ip_route_zebra function
This command permits dumping zebra routes from a vrf

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
5cffda1882 lib: implement standardized compare functions
In a effort to migrate more tests to use `run_and_expect` instead of
`sleep`s, this commit imports some common functions used to compare
router output. Retrying output comparison for N times, instead of
relying on arbitrary code `sleep`s, should help CI system tests fail
less and possibly run for less time.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
9683a1bb50 lib: improve normalize_text with another case
When normalizing a text also remove trailing whitespace since external
tools might add them. This commit fixes a test failure in ospf_topo1 on
Ubuntu 18.04.1.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
fd8582906d lib: show run_and_expect spent time
Standardize run_and_expect to show start and end time along with maximum
estimated wait time.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
3e379f6e49 topotests: fix json_cmp wrong list handling
Don't quit on the first match. While here add some more `json_cmp` tests
to make sure this doesn't happen again.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
a82e5f9a7f lib: improve json_cmp
Allow json_cmp to compare JSON values which begin with a list instead of
a dictionary.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Christian Franke
f2d6ce41ca lib: check presence of mpls modules, not exitcode of modprobe
Signed-off-by: Christian Franke <nobody@nowhere.ws>
2018-11-27 20:22:14 -05:00
Martin Winter
2c805e6cf6 lib: Fix staticd extension
Do not provide a staticd.conf to force staticd to read it's config
from zebra.conf

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Martin Winter
a2a1134c77 lib: Add support for staticd
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Lou Berger
dce382d4a9 lib: don't report cores on exit as asserts in 5.0
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
436aa319bc lib: don't assert on shutdown errors in rel < 5.0
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
fb80b81b26 lib: add and use Router.checkRouterVersion (based on bdpd version)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
83c26937f4 lib: collect shutdown errors, add assert on single router shutdown
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
b0f0d980b5 lib: allow all rw access to /tmp/topotests (for package support and debug)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
da63d5b319 lib: use per node log directory when topotest is used without topogen
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
2a59a86b50 lib: limit checkRouterCores output to once per router start
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
f76774ec9d lib: add check for core and memory issues after routerstop
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger
e1dfa45e1b lib: convert to directories per node
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Philippe Guibert
8dd5077d81 lib: zebra support for vrfwnetns parameter
topotest library is being added a new parameter when preparing the
configurationof each daemon. This parameter will be used to call the
daemon with some extra parameters. The -n parameter for zebra is taken
into account.
Also, when a extra parameter is given for calling zebra, a check is done to
see if it is possible to run zebra daemon with that option. This is the
case for vrfwnetns option. If not available, an error message is sent
back.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-11-27 20:22:13 -05:00
Lou Berger
9711fc7e0b lib: add tgen level mpls init and hasmpls flag
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger
447f2d5a16 lib: add router.has_mpls check
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Rafael Zalamena
e600b2d93c topotest: remove pid files
Remove PID files after a SIGKILL or confirmation that the pid file no
longer contains a running PID.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
065bd557f8 topotest: improve informational messages
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
63038f4b02 topotest: show the user that we are waiting
Add a log message to tell the user that we are waiting for zebra.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Lou Berger
3a568b9ca6 lib: speed up router shutdown stopRouter: report when a process is being killed only sleep if actually killed a process add option to not sleep or conduct -7 kill topogen stop: add wait parameter (defaults to old/wait) when stopping routers, first stop all without waiting then do a second pass where will wait if needed
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
08533b7bce topotest: always show diff on json_cmp failure
Append diffs on all json_cmp failures so the reader can compare JSON
field differences.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
479b98aacd topotest: specify why we are waiting
This shows the user why the router teardown is taking 2 seconds long.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
222ea88b2a 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.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
034237db12 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.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
7bd28cfc67 topotest: improve json error messages
Show a diff of the JSON values instead of dumping the whole
data structures.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
2db5888df5 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.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
bc2872fd17 topotest: allow passing options to difflib
Extend the topotest diff functions to allow receiving difflib options.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
566567e9be topotest: remove unused json_cmp unused parameter 2018-11-27 20:22:12 -05:00
Martin Winter
7551168cba 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>
2018-11-27 20:22:12 -05:00
Martin Winter
44a592b2a6 lib: check for eigrpd available and return warning if missing instead of failing 2018-11-27 20:22:12 -05:00
Donald Sharp
cda83bee9f Allow topotests to work with eigrp and nhrp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:12 -05:00
David Lamparter
91733ef85e topotests: change from "context" to "unified" diff
context diff:
*** before.py
2018-11-27 20:22:12 -05:00
Martin Winter
b431b5540f lib: Enhance daemon_available() function to check for mpls modules in case of LDPd
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Martin Winter
e1b2ce6a70 lib: Add check for MPLS kernel modules to exist before trying LDP tests
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:12 -05:00
Rafael Zalamena
570f25d80a 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.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
99a7a912fd topotest: implement 'ip route' functions
Implement an abstraction to the commands 'ip route' to get the node
current routing table state.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
45619ee3de topotest: simplify ldp kernel check
Use version_cmp() instead of hand rolling its own parser.
2018-11-27 20:22:12 -05:00
Rafael Zalamena
4190fe1ef1 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.
2018-11-27 20:22:11 -05:00
Rafael Zalamena
f7840f6bdf 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.
2018-11-27 20:22:11 -05:00
Rafael Zalamena
dc0d3fc53f 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.
2018-11-27 20:22:11 -05:00
Rafael Zalamena
13e1fc493b 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
2018-11-27 20:22:11 -05:00
Rafael Zalamena
6c131bd303 topotest: use topolog instead of print
Fix some whitespace issues while at it.
2018-11-27 20:22:11 -05:00
Rafael Zalamena
edd2bdf6de 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.
2018-11-27 20:22:11 -05:00
Rafael Zalamena
3668ed8dc2 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.
2018-11-27 20:22:11 -05:00
Rafael Zalamena
09e21b4487 topotest: implement json_cmp function
Implemented a JSON compare function that tells you when a specific
subset of items exist or not inside a JSON dataset.

More details can be found in the function docstring or in the test file
lib/test_json.py.
2018-11-27 20:22:11 -05:00
Rafael Zalamena
2ab8553078 topotest: parameterize daemon's path
This diff is a code cleanup that will allow us more flexibility when
defining and using the daemon binaries path, it also fixes a few pylint
warnings.
2018-11-27 20:22:11 -05:00
Rafael Zalamena
1fca63c1e4 topogen: first code import
Topogen (Topology Generator) is a helper that wraps around Topotest to
simplify some of the boilerplate code. This abstraction will help the
development of new tests and new APIs without breaking the existing
ones. It also makes the relation of objects clearer, since we no longer
touch the Mininet API directly, which in turn also makes us less
vulnerable to external API changes.
2018-11-27 20:22:11 -05:00
Rafael Zalamena
797e8dcf5c lib: assert sysctl values
Implemented two functions to help setting sysctl values:

* set_sysctl: set a sysctl and return an auditable return value
* assert_sysctl: uses the previous function to assert that the sysctl
  was set
2018-11-27 20:22:11 -05:00
Martin Winter
c8cff3ced1 lib: Fix stopRouter not to fail for case if daemon was never started
Fixes the issue for topotest to fail ot end of skipped LDP test on
a system without MPLS support

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
17070436a3 lib: cleanup diff text output formatting issue and move to library
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
4942f29847 lib: Move AddressSanitizer check to separate procedure and add check for errors in vtysh itself as part of checkRouterRunning
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
311dba3332 lib: Send Output error from AddressSanitizer to StdErr
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
84379e8e7f lib: Add different failure comment on processes killed by AddressSanitizer
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
597cabb74d lib: Move updated topotest.py lib with AddressSanitizer to correct directory (fix mistake from 2 commits ago)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
50c40bdebb Fix memory leak detection and reporting which accidentally was dropped a month ago
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
e9125d9286 lib: Fix another typo on kernel compare
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
c63b6f86f0 lib: Fix version check in previous kernel compare
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Donald Sharp
dd43120e8e Actually fix version comparison
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:11 -05:00
Donald Sharp
dd4eca4d97 lib: Fix kernel version parsing
When we have a kernel sub version > 10 the float conversion
of the kernel version causes 4.10 to be less than 4.5

Get the kernel version in groups on <major>.<minor> and do
comparison that way

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-27 20:22:11 -05:00
Martin Winter
80eeefb7da lib: Add function to check for daemon available (i.e. LDPd) and function to return typ (quagga or frr)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
a93477ec42 topotest library: Fix creation of /etc/XXX/vtysh.conf
- Needs to be created in local filesystem of each router

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
99561211e1 Added optional output for memleaks at the end of test. Enable them by setting the environment variable TOPOTESTS_CHECK_STDERR to some value
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00
Martin Winter
594b1259f9 Move common function and class to topotest library
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-11-27 20:22:11 -05:00