Since the test was not named test_bgp_gr_functionality_topo3.py
pytest was not picking it up to run. Let's run it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The tests are failing due to heavily loaded system and insufficient
time for large configs to be handled. Increasing the time
allows the tests to complete locally for me under heavy load.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Some test steps result in removing some entries in the MPLS forwarding
table. However, these steps pass before the entries are actually
removed.
Use the exact JSON comparison so that the removal of the entries is
checked.
Fixes: 1a61ef95b2 ("tests: add isis_sr_flex_algo_topo1 for flex-algo")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
the bgp_default_originate test brings up the topology and
then immediately pings. Which sometimes fails. This is
of course possible since the first ping might actually fail
due to arp going on. So let's give it a second chance or two.
Especially since the test, at this point, is just installing
a default route.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
- Allow selecting results using a regexp
- Allow selecting results using commasep range specs
- Add support for getting and saving results from a docker/podman
container.
- update docs
Signed-off-by: Christian Hopps <chopps@labn.net>
fixes#13584
The test had the ospf client injecting multiple opaque LSAs on 5s pace,
but the test itself verified and advanced on an LSA in the middle of
that sequence and not the last one. Then the test reset the ospf client
and originating router. If a later injected LSA managed to get in to the
router and flooded prior to the client/router reset then the opaque data
or sequence number could differ from the expected value.
Signed-off-by: Christian Hopps <chopps@labn.net>
Currently, delayed reflooding on P2MP interfaces for LSAs received
from neighbors on the interface is unconditionally (see commit
c706f0e32b). In some cases, this
change wasn't desirable and this feature makes delayed reflooding
configurable for P2MP interfaces via the CLI command:
"ip ospf network point-to-multipoint delay-reflood" in interface
submode.
Signed-off-by: Acee <aceelindem@gmail.com>
When running the pytests in parallel, calling pytest.exit() causes
the entire test run to be aborted. Which.... Is frankly not cool.
Let's notice the failure and move on to the next tests.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
A bunch of tests rely on pre-generated config from
json files. These tests were not putting `exit` stanzas
and a bunch of the tests as a result are silently failing
to configure properly at all, as commands were being sent
to the wrong daemons.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The test is performing these steps:
a) get timestamp of route installed in zebra
b) <make changes>
c) get new timestamp of route installed in zebra
If < 1 second happens between A and C the test
assumes that something went wrong, as that it is
testing to see if the route was reinstalled <yes I know>.
Just sleep 1 second after a) happens so that if a reinstall
happens we can easily see it, and we also know that if a
reinstall doesn't happen then the new timestamp will
always be 1 second or greater.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
From running the test:
bgp_remove_private_as/test_bgp_remove_private_as.py::test_bgp_remove_private_as
/home/sharpd/.local/lib/python3.10/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but bgp_remove_private_as/test_bgp_remove_private_as.py::test_bgp_remove_private_as returned True, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
- Restore default of looking for a daemon config underneath the router directory
if no config file was specified.
- Recent change for adding unified config support had a logic bug, fix
- Update the one test that conflicted with this default
- comment out asyncio option causing warnings if asyncio wasn't installed.
Signed-off-by: Christian Hopps <chopps@labn.net>
Our CI test system is configuring interfaces like this:
int A
<ospfX config>
router ospfX
router-id Z.Y.M.Q
On sufficiently loaded systems, the router-id might not be respected because
the interface A neighbor might have come up by the time the router-id
command is read in. This is a problem for our topotests in that
the tests expect neighbors to be formed with certain router-id,
but the FRR code has stored the new router-id but not accepted
it's use since a neighbor relationship has formed.
Modify the ci test system code to put the 'router ospfX' commands
before the interface commands, thus forcing the router-id to be
read in *before* any possibility that the neighbor can have come
up.
Also, I've filed issue #13452 to address the ordering of commands
with regards to router-id in our ospf protocols. Once that is
done this should be backed out, to return to a more natural ordering
of commands.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Recently clear commands were added to the tests that do nothing
because they are using the wrong way to input the command.
Since these do nothing remove them:
2023-05-16 16:39:07,072.072 DEBUG: topolog.r0: Router(r0): cmd_status("['/bin/bash', '-c', 'clear ip ospf neighbor']", pre_cmd: "['/usr/bin/nsenter', '--mount=/proc/4157893/ns/mnt', '--net=/proc/4157893/ns/net', '--uts=/proc/4157893/ns/uts', '-F', '--wd=/tmp/topotests/ospf_basic_functionality.test_ospf_asbr_summary_topo1/r0']" use_pty: False kwargs: {'stdout': -1, 'stderr': -2, 'encoding': 'utf-8', 'shell': False, 'stdin': None, 'env': {'LANG': 'en_US.UTF-8', 'LS_COLO)
2023-05-16 16:39:07,120.120 WARNING: topolog.r0: Router(r0): proc failed: rc 1 pid 4161077
args: /usr/bin/nsenter --mount=/proc/4157893/ns/mnt --net=/proc/4157893/ns/net --uts=/proc/4157893/ns/uts -F --wd=/tmp/topotests/ospf_basic_functionality.test_ospf_asbr_summary_topo1/r0 /bin/bash -c clear ip ospf neighbor
stdout: Usage: clear [options]
Options:
-T TERM use this instead of $TERM
-V print curses-version
-x do not try to clear scrollback
stderr: *empty*
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tableVersion always incorrectly showed 0 instead of a decent value. Let's get rid
of this from the partial output at all.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>