Christian Franke [Wed, 17 Oct 2018 16:27:35 +0000 (18:27 +0200)]
Dockerfile: Move to project root and combine RUNs
According to https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run
`apt-get update` should always be combined with `apt-get install` in
the same `RUN` statement, to avoid installation of outdated packages.
Also, combine some more `RUN`s together as to avoid fewer layers.
Finally, remove some comments which are superflous. Comments shouldn't
describe what is done, especially when it's obvious. They should
explain why something is done.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Philippe Guibert [Wed, 28 Nov 2018 11:15:09 +0000 (12:15 +0100)]
lib: do not convert ip prefixes without '.'
There are cases where the passed parameter for a vty command is either
an interface name or an ip address. Because the interface name can be a
number, and because the user may want to use a number to define an IP (
for instance 'ping 0' is valid from shell purpose), there is a choice
that needs to be done at frr level. either from the application point of
view, the interface name will be priorized, or each number will be
considered as an ip address. In that commit, the inet_aton procedure is
replaced with the inet_pton procedure that ignores ips with just a
number.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Donald Sharp [Mon, 26 Nov 2018 15:56:56 +0000 (10:56 -0500)]
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>
Philippe Guibert [Tue, 23 Oct 2018 16:22:50 +0000 (18:22 +0200)]
bgp-ecmp-topo1: change default vrf name
By default, default vrf name is default, whereas BGP default vrf was
hardcoded to Default. Because this will be fixes, do not care about the
vrf name field and apply a regexp to move Default to default.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Christian Franke [Thu, 18 Oct 2018 12:16:16 +0000 (14:16 +0200)]
ospf6-topo1: Don't compare link-local routes
Topotests would fail with errors like these:
AssertionError: Linux Kernel IPv6 Routing Table verification failed for router r1:
--- actual OSPFv3 IPv6 routing table
+++ expected OSPFv3 IPv6 routing table
@@ -8,6 +8,6 @@
fc00:4:4:4::/64 via fe80::__(r3-sw5)__ dev r1-sw5 proto XXXX metric 20 pref medium
fc00:a:a:a::/64 dev r1-sw5 proto XXXX metric 256 pref medium
fc00:b:b:b::/64 via fe80::__(r3-sw5)__ dev r1-sw5 proto XXXX metric 20 pref medium
-fe80::/64 dev lo proto XXXX metric 256 pref medium
fe80::/64 dev r1-stubnet proto XXXX metric 256 pref medium
-fe80::/64 dev r1-sw5 proto XXXX metric 256 pref medium
+fe80::/64 dev r1-sw5 proto XXXX metric 256 pref medium
+unreachable fe80::/64 dev lo proto XXXX metric 256 error -101 pref medium
Resolve this by not comparing link-local routes.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Lou Berger [Wed, 29 Aug 2018 15:48:37 +0000 (15:48 +0000)]
bgp_rfapi_basic_sanity_config2: added rfapi test with partial table download This is identical to bgp_rfapi_basic_sanity with the exception of non-default config
Donald Sharp [Wed, 22 Aug 2018 19:03:18 +0000 (15:03 -0400)]
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>
Philippe Guibert [Tue, 24 Jul 2018 16:21:14 +0000 (18:21 +0200)]
ospf-topo1-vrf: replace link_enable api with zebra topotest api
Because on some platforms like i386, 'ip netns ' commands are unstable,
then I use an other API to operate the shutdown/no shutdown operation by
using vtysh.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Rafael Zalamena [Fri, 3 Aug 2018 16:23:52 +0000 (13:23 -0300)]
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>
Rafael Zalamena [Fri, 3 Aug 2018 15:21:52 +0000 (12:21 -0300)]
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>
G. Paul Ziemba [Sat, 21 Apr 2018 17:23:54 +0000 (10:23 -0700)]
bgp: tolerate route-table-show header changes of PR 2045
The table header has changed slightly for "bgp show" commands. Change
all-protocol-startup (test_bgp_ipv4() and test_bgp_ipv6()) and
bgp_multiview_topo1 (test_bgp_routingTable()) to run diffs against multiple
templates (representing the various valid outputs for different versions
of the FRR code) and mark the test "passed" if any one template matches.
G. Paul Ziemba [Mon, 16 Apr 2018 13:40:52 +0000 (06:40 -0700)]
bgp_l3vpn_to_bgp_vrf: use FRR PR #2053
Check CE routes from CE in another VRF attached to same PE router. Relies
on FRR bug fix to not require labeled nexthop for paths that go only
through PE router and not mpls core.
G. Paul Ziemba [Thu, 12 Apr 2018 06:03:43 +0000 (23:03 -0700)]
lib: lutil matching without changing newlines
Prior behavior of luCommand was to convert newlines to spaces in DUT
output before pattern matching. New method operating in parallel uses
re.DOTALL to mimic same behavior and allow preserving original DUT output.
The original output is needed for some scripts that parse line-by-line.
There is also some test code to compare match results using the
old way and new way and log a message if they are different. After
some short time we can develop confidence that using this new method
will not break any existing tests.