Commit Graph

3080 Commits

Author SHA1 Message Date
Donatas Abraitis
e0db9a05bd
Merge pull request #13763 from LabNConsulting/mgmtd/simplify
fix 'exit' bug in config file processing, et al.
2023-06-13 11:10:18 +03:00
Donald Sharp
6ec1065217 tests: test_bgp_flowspec_topo.py changes as per linter
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-12 09:22:51 -04:00
Donald Sharp
773376a3c3 tests: The bgp_flowspec frequently fails try to gather more data
Add a bit of code to allow the bgp_flowspec topotest to gather
data when something goes wrong.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-12 09:22:51 -04:00
Donatas Abraitis
7ac46d8a08 tests: Check if neighbor X advertised-routes cmd works for peer-groups
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-12 15:20:08 +03:00
Donatas Abraitis
48008be43f tests: Apply black formatting for rip_topo1/ripng_topo1
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-12 11:45:03 +03:00
Donatas Abraitis
717f180a49 tests: Use run_and_expect() for ripng_topo1
Avoid checking once and failing immediately.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-12 11:40:09 +03:00
Donatas Abraitis
3349754a80 tests: Use run_and_expect() for rip_topo1
Avoid checking once and failing immediately.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-12 11:38:01 +03:00
Christian Hopps
dac48df52a tests: add mgmtd config test
Testing early exits/ends from config files loaded with `vtysh -f cfgfile`
as well as `vtysh < cfgfile`, verify the same as non-mgmtd behavior.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-12 03:23:51 -04:00
Donald Sharp
ae88ba4b52 tests: Fix missing assert for test case in bgp_suppress_fib
Test was attempting to test the 60.0.0.0 route but was querying
10.0.0.3 and ignoring the result.  Let's fix it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-09 09:25:29 -04:00
Jafar Al-Gharaibeh
e48e92e76c
Merge pull request #13734 from LabNConsulting/chopps/removeunused
remove mentions of socat
2023-06-08 23:46:45 -05:00
Quentin Young
cb827d9f55
Merge pull request #13650 from opensourcerouting/feature/bgpd_default_originate_route_map_timer
bgpd: Add an ability to control default-originate route-map timer
2023-06-08 12:05:35 -04:00
Christian Hopps
17054f373e doc: update doc removing socat req + remove unused tests code
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-08 11:03:18 -04:00
Christian Hopps
b28bc2561e tests: convert old pim test to more cleanly use pytest fixture
This is a good way to run a per-test background helper process. Here the
helper object is created before the test function requesting it (through param
name match), and then cleaned up after the test function exits (pass or failed).

A context manager is used to further guarantee the cleanup is done.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-08 04:55:32 -04:00
Christian Hopps
efedb18976 tests: fixing pim6 topotest bugs
- Remove use of bespoke socat
- Use ipv6 support in mcast-tester.py
- do not run processes in the background behind munet/micronet's
  back with `&` (ever) -- use popen or the helper class

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-08 04:55:32 -04:00
Christian Hopps
71231d304f tests: mcast-tester.py handles IPv6
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-08 02:39:09 -04:00
Donatas Abraitis
0ec8b2d869 tests: Test neighbor X addpath-tx-best-selected command
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-06-07 22:27:28 +03:00
Donatas Abraitis
7f0c12d5b3
Merge pull request #13622 from kuldeepkash/bgp_always_compare_med
tests: Adding bgp_always_compare_med testuite
2023-06-07 09:36:15 +03:00
Donald Sharp
8625fe0f45 tests: Babel tests do not need to log to eigrp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-06-06 11:59:20 -04:00
Donald Sharp
da877b5ced
Merge pull request #13690 from LabNConsulting/chopps/mgmtd-cleanup
Chopps/mgmtd cleanup
2023-06-06 07:22:31 -04:00
Martin Winter
6a771192de
Merge pull request #13618 from LabNConsulting/chopps/fixlogging 2023-06-06 02:35:20 -07:00
Donatas Abraitis
fecc953b3c
Merge pull request #13670 from donaldsharp/coverity_99
Coverity 99
2023-06-05 22:33:55 +03:00
Christian Hopps
ee235c606f tests: mgmtd: add prologue to bigconf tests
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-05 13:53:51 -04:00
Donald Sharp
05cb9e55a7
Merge pull request #13658 from louis-6wind/fix-flex-algo2
isisd: fix wrongly disabled flex-algorithm
2023-06-05 12:43:01 -04:00
Christian Hopps
9c57c2900a tests: fix some broken logging
- make sure we close and remove all handlers for named logs on each reuse.
- test module level exec.log no longer truncated to last test case output
- cleanup the log names, and make sure they are present in all exec logs
- keep separate exec logs for each pytest worker when running in distributed mode
- disabled code due to CI infra can't handle it: add per test case exec logs

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-05 12:42:57 -04:00
Donald Sharp
0889f6d894 tests: Rename a test to test_bgp_gr_functionality_topo3.py
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>
2023-06-05 07:57:49 -04:00
Christian Hopps
be3c453556 tests: pause (with CLI) at step() functions when run with --pause
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-06-04 17:38:19 -04:00
Donald Sharp
84af55b268 tests: new mgmt_startup tests are failing due to insufficient time
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>
2023-06-01 09:57:48 -04:00
Louis Scalbert
5f230545e1 tests: re-style isis_sr_flex_algo_topo1
Re-style isis_sr_flex_algo_topo1. Cosmetic change.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-06-01 14:26:48 +02:00
Louis Scalbert
b24bad5632 tests: fix mpls table check in isis_sr_flex_algo_topo1
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>
2023-06-01 14:14:51 +02:00
Donatas Abraitis
1bfbdc17f2 tests: Check if bgp default-originate timer command works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-05-31 22:58:32 +03:00
Donald Sharp
22c10bbdaa tests: Actually loop if ping fails
The usage of run_and_expect doesn't work if the function
being called as the run part asserts.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-05-30 15:43:42 -04:00
Donatas Abraitis
147c7a2de3
Merge pull request #13631 from donaldsharp/fix_some_ping_issues
various issues
2023-05-30 21:26:24 +03:00
Trey Aspelund
6510458757 tests: add topotest for EVPN MAC-VRF SoO
Adds topotest to cover the new EVPN MAC-VRF Site-of-Origin feature.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2023-05-30 15:25:37 +00:00
Christian Hopps
7cd87abc5e tests: add unified config tests
- simple unified test
- unified test with late backend startup test

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30 04:09:29 -04:00
Christian Hopps
e3c4bd2472 tests: add some more mgmtd tests
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30 02:10:20 -04:00
Christian Hopps
5ba5613077 lib: mgmtd: add manual vty server start option and use it
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-30 02:10:20 -04:00
Kuldeep Kashyap
ac9c7ac8ba tests: Adding framework support for bgp_always_compare_med
Added/enhanced bgp.py to support config/
unconfig bgp always compare med related
configurations.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-05-29 13:20:15 +05:30
Kuldeep Kashyap
9bd040b2fa tests: Adding bgp_always_compare_med testuite
Automated 5 different scenarios to verify BGP
always compare med functionality.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2023-05-29 13:07:54 +05:30
Donald Sharp
131153ea22 tests: Allow ping to run multiple times before failing
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>
2023-05-28 07:37:25 -04:00
Christian Hopps
898499a50f tests: python-foo assure foo[0] is on a list not dict_values object
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-28 05:13:22 -04:00
Donald Sharp
780a8a10e6 tests: Convert to using logger.warning
Use the non deprecated format.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-05-26 16:00:42 -04:00
Donald Sharp
618a9f0592
Merge pull request #13607 from LabNConsulting/chopps/fixospftest
tests: ospfapi: fix non-determinism in test
2023-05-26 15:09:38 -04:00
Donald Sharp
145acbb3bb
Merge pull request #13599 from LabNConsulting/chopps/analyze-search
tests: allow selecting test results by regexp match
2023-05-26 07:20:17 -04:00
Christian Hopps
054d6bdc48 tests: selecting results by regexp and ragnes, add container support
- 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>
2023-05-26 06:32:24 -04:00
Christian Hopps
39e1f084b5 tests: ospfapi: fix non-determinism in test
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>
2023-05-26 05:09:13 -04:00
Christian Hopps
27c6bfc217 tests: cleanup the config file specification and default code
Also, add a new warning for missing configuration files when user is
expecting them.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-26 00:33:07 -04:00
Quentin Young
254feba0a5
Merge pull request #13592 from LabNConsulting/chopps/newmunet
munet: import 0.13.5 w/ nicer cmd logging
2023-05-24 12:20:41 -04:00
Christian Hopps
8aba44e3a7 munet: import 0.13.5 w/ nicer cmd logging
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-24 02:48:35 -04:00
Russ White
575a0c5e3c
Merge pull request #13555 from LabNConsulting/aceelindem/ospf-p2mp-delayed-reflooding-config
ospfd: OSPF P2MP Delayed Reflooding configuration
2023-05-23 11:41:35 -04:00
Russ White
fa45a19a60
Merge pull request #13535 from opensourcerouting/feature/ripng_allow_ecmp
ripng: Implement allow-ecmp X command
2023-05-23 07:35:32 -04:00
Donatas Abraitis
29d3532a7a tests: Check if allow-ecmp command works for RIPng
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-05-23 09:29:02 +03:00
Acee
0d8ef0477c ospfd: OSPF P2MP Delayed Reflooding configuration
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>
2023-05-22 15:51:41 -04:00
Donald Sharp
b31a1797c6 tests: Do not Cause test scripts to stop running when config load fails
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>
2023-05-22 10:52:54 -04:00
Donald Sharp
af53f97f34 tests: Add exit stanzas to pre-generated config
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>
2023-05-22 10:52:54 -04:00
Donald Sharp
b9de32473d tests: Slow bgp_default_originate test down slightly
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>
2023-05-22 10:06:07 -04:00
Donatas Abraitis
f0ac9aa4a7
Merge pull request #13563 from donaldsharp/remove_true
tests: pytest does not like return True from a test
2023-05-22 09:38:53 +03:00
Donald Sharp
697e7e5174
Merge pull request #13566 from LabNConsulting/chopps/analyze-improvement
tests: have ananlyze.py `chown -R $SUDO_USER` when copying results
2023-05-21 20:22:22 -04:00
Donald Sharp
57a2ff8b8d
Merge pull request #13568 from opensourcerouting/fix/timers_bgp_topotests
tests: Fix timers command for bgp_disable_addpath_rx test
2023-05-21 20:21:51 -04:00
Donatas Abraitis
f55bd028b7 tests: Fix timers command for bgp_disable_addpath_rx test
Was incorrectly setting BGP timers.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-05-20 10:06:49 +03:00
Christian Hopps
2013c684d0 tests: munet to version 0.13.4
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-19 23:16:39 -04:00
Christian Hopps
47e52c47d4 tests: have ananlyze.py chown -R $SUDO_USER when copying results
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-19 23:14:18 -04:00
Donald Sharp
cd0956e69d
Merge pull request #13559 from opensourcerouting/fix/ignore_decoding_chars
tests: Ignore utf-8 decoding errors
2023-05-19 21:30:34 -04:00
Donald Sharp
03b53c1229 tests: pytest does not like return True from a test
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>
2023-05-19 12:52:51 -04:00
Donatas Abraitis
76b246aa1f tests: Ignore utf-8 decoding errors
This is happening sometimes for stuff like `r1 shi cat ...`.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-05-19 14:57:56 +03:00
Donatas Abraitis
a8bc67a989
Merge pull request #13369 from samanvithab/bgpd_fix
lib : fix duplicate prefix list delete
2023-05-18 10:24:41 +03:00
Donatas Abraitis
c374605ecb
Merge pull request #13541 from LabNConsulting/chopps/fixtestdefconf
tests: fix implicit config file and recently added logic error
2023-05-18 09:44:38 +03:00
Christian Hopps
f3525b0b17 tests: fix implicit config file and recently added logic error
- 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>
2023-05-17 16:05:53 -04:00
Christian Hopps
fea00bad20 tests: fix pylint error, and update style in lib/*.py
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-17 13:42:32 -04:00
Donald Sharp
244d5d0a16 tests: Change order of config files
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>
2023-05-17 09:20:46 -04:00
Donald Sharp
e396a4f0c6 tests: Clean up commands that do nothing
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>
2023-05-17 09:20:46 -04:00
Donald Sharp
98f71533f6
Merge pull request #13529 from pguibert6WIND/bgp_vpnv6_per_nexthop_fix
topotests: fix bgp_vpnv6_per_nexthop, syncing with bgp rib
2023-05-17 07:56:07 -04:00
Russ White
18978d1280
Merge pull request #13526 from opensourcerouting/fix/show_table_version_per_subgrp
bgpd: Show the real table version for a decent peer subgroup
2023-05-16 10:14:04 -04:00
Russ White
425fc1f5b7
Merge pull request #12949 from opensourcerouting/ospf-unplanned-gr
OSPF GR for unplanned outages
2023-05-16 08:37:19 -04:00
Philippe Guibert
e82cd92b19 topotests: bgp_vpnv6_per_nexthop_label, use only global ipv6 addresses
The test is modified so as to use global ipv6 addresses for nexthop
resolution.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-05-16 12:40:40 +02:00
David Lamparter
cf0eeb3dc1
Merge pull request #12050 from LabNConsulting/working/lb/topotest-220909 2023-05-16 08:31:06 +02:00
Donatas Abraitis
f913ee30ff tests: Drop tableVersion from EVPN PIM test case
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>
2023-05-16 09:06:06 +03:00
Christian Hopps
44701495bb tests: improve bgp test determinism
don't grep the tail of a log file after running a previous test, there could be
(and have been) other items added to the log in between.

add before and after count of shutdown messages to very the actual message shows
up as the test intended, and keep the search for the shutdown message.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-12 20:36:50 -04:00
Donatas Abraitis
edc886635d
Merge pull request #13463 from pguibert6WIND/mpls_alloc_per_nh_2
Mpls allocatio mode per nexthop
2023-05-12 20:56:01 +03:00
Donald Sharp
907183cb35
Merge pull request #13430 from opensourcerouting/feature/rip_allow-ecmp_limit
ripd: Implement allow-ecmp X command
2023-05-11 20:31:46 -04:00
Donald Sharp
f1af873fef
Merge pull request #13490 from Jafaral/fix-ospf-asbr-test
tests: improve log messages, clear neighbors to avoid bad state
2023-05-11 20:31:21 -04:00
Jafar Al-Gharaibeh
1fdd28a730 tests: reset neighbor state machine to avoid bad/stale state
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2023-05-11 09:51:26 -05:00
Donald Sharp
4ce530f750
Merge pull request #13507 from opensourcerouting/feature/bgp_route-map_match_source-protocol
bgpd: Implement match source-protocol for route-maps
2023-05-11 09:38:57 -04:00
Lou Berger
083d367279 topotest: all_protocol_startup - respect TOPOTESTS_CHECK_STDERR environ variable
Signed-off-by: Lou Berger <lberger@labn.net>
2023-05-11 07:46:19 -04:00
Lou Berger
d4977708f0 topotest: add --memleaks topotest option
Signed-off-by: Lou Berger <lberger@labn.net>
2023-05-11 07:46:19 -04:00
Lou Berger
c6686550c3 topotests: fix looging of memstat results
Signed-off-by: Lou Berger <lberger@labn.net>
2023-05-11 07:46:18 -04:00
Donatas Abraitis
9c3ffc80db tests: Check if match source-protocol route-map cmd works for BGP
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-05-11 11:40:42 +03:00
Jafar Al-Gharaibeh
ba607fdfcb tests: log the router id in ospf tests, improve log in a couple of places
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2023-05-10 23:47:03 -05:00
Jafar Al-Gharaibeh
bc05bccbdc
Merge pull request #13489 from LabNConsulting/ospf-opaque-stale-fix
ospfd: OSPF opaque LSA stale processing fix and topotests.
2023-05-10 15:51:21 -05:00
Christian Hopps
b81bb36960 tests: update to munet 0.13.3, restoring GNU screen functionality
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-05-10 09:47:57 +00:00
Acee
4e7eb1e62c ospfd: OSPF opaque LSA stale processing fix and topotests.
1. Fix OSPF opaque LSA processing to preserve the stale opaque
            LSAs in the Link State Database for 60 seconds consistent with
            what is done for other LSA types.
         2. Add a topotest that tests for cases where ospfd is restarted
            and a stale OSPF opaque LSA exists in the OSPF routing domain
            both when the LSA is purged and when the LSA is reoriginagted
            with a more recent instance.

Signed-off-by: Acee <aceelindem@gmail.com>
2023-05-09 16:51:03 -04:00
Philippe Guibert
37a02a8dcb topotests: add bgp_vpnv6 test allocation
This test demonstrates that a label is allocated for each
ipv6 next-hop. IPv6 test introduces link local ipv6 addresses
as next hops, and compared to IPv4, one can have two different
next-hops depending if the next-hop is defined by a global
address (static route redistributed) or a bgp peer.

This test checks that:
- The labels are correctly allocated per connected next-hop.
- The default label is used for non connected prefixes.
- The withdraw operation frees the MPLS entry.
- If a recursive route is redistributed by BGP, then the nexthop
tracking will find the appropriate nexthop entry, and the
associated label will be found out.
- When a prefix moves from one peer to one another behind the
vrf, then the MPLS switching operation for return
traffic is changing the outgoing interface to use.
- When the 'label vpn export <value>' MPLS label value is changed,
then the modification is propagated to prefixes which use that value.
- Also, when unconfiguring the per-nexthop allocation mode, check
that the MPLS entries and the VPNv4 entries of r1 are changed
accordingly.
- Reversely, when re-configuring the per-nexthop allocation mode,
check that the allocation mode reuses the other label values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-05-09 21:01:08 +02:00
Philippe Guibert
ae5a6bc1f6 topotests: add bgp mpls allocation per next-hop test
A new test suite checks for the mpls label allocation
per nexthop mode. This test checks that:
- The labels are correctly allocated per connected
next-hop.
- The default label is used for non connected prefixes
- The withdraw operation frees the mpls entry.
- If a recursive route is redistributed by BGP, then the nexthop
tracking will find the appropriate nexthop entry, and the associated
label will be found out.
- When a prefix moves from one peer to one another behind the vrf,
then the MPLS switching operation for return traffic is changing
the outgoing interface to use.
- When the 'label vpn export <value>' MPLS label value is changed,
then the modification is propagated to prefixes which use that value.
- When unconfiguring the per-nexthop allocation mode, check
that the MPLS entries and the VPNv4 entries of r1 are changed
accordingly.
- Reversely, when re-configuring the per-nexthop allocation mode,
check that the allocation mode reuses the other label values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-05-09 21:00:57 +02:00
Donald Sharp
788db21e73
Merge pull request #13438 from gpnaveen/vrf_on_loopback
tests: removing un used loopback interface from bgp admin dist.
2023-05-09 13:39:18 -04:00
Donald Sharp
ebfbce2e54
Merge pull request #13460 from Jafaral/ospf-fix2
tests: remove sleep ospf test
2023-05-09 13:37:40 -04:00
Donald Sharp
b03eecbd2e
Merge pull request #13470 from crosser/fix-test-frrscript
test_frrscript: fix dep for out of tree build
2023-05-09 11:30:17 -04:00
Samanvitha B Bhargav
accafb6b78 tests: Verify duplicate prefix list delete fix
Added topotest cases for the modification of added
prefix lists.

Author: Vijay kumar Gupta <vijayg@vmware.com>
Signed-off-by: Samanvitha B Bhargav <bsamanvitha@vmware.com>
2023-05-09 03:51:45 -07:00
Jafar Al-Gharaibeh
3446fec118 tests: remove sleep ospf test
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2023-05-08 23:08:35 -05:00
Martin Winter
6a3631468d tests: Fix ospfv3 output to include Graceful Restart info
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2023-05-08 21:47:44 -03:00
Renato Westphal
763c4113aa tests: add tests for OSPF GR unplanned outages
Reuse the exiting GR topotests since planned and unplanned GR should
behave the same.

The only difference is that for unplanned GR there's no preparation
phase. The OSPF daemons are just killed (SIGTERM) and restarted
normally. The tests then proceed to do the same checks they do for
planned GRs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2023-05-08 21:47:44 -03:00
Eugene Crosser
5b2ee104c2 tests: Fix out of tree build for lua scripting
test_frrscript is run from the `tests` directory and expects the sample
lua script `script1.lua` to be present in the `lib` directory. When the
package is built out of tree (which always happens when a debian
package is built), and scripting is enabled, test fails because the lua
file is not present in the `tests/lib/` subdir of the _build_ directory.

Fix this by adding `script1.lua` as an extra dependency for
`test_frrscript`, and a recipe that copies the file from the source tree
to the build tree (note: it needs to be marked ".PHONY" because
otherwise `make` thinks that it already exists, in the source tree).

After this commit, the following command starts to work:

    dpkg-buildpackage --build-profiles=pkg.frr.lua -b -uc

Signed-off-by: Eugene Crosser <crosser@average.org>
2023-05-09 02:05:44 +02:00