Commit Graph

4080 Commits

Author SHA1 Message Date
Christian Hopps
e8648a0c72 lib: add flag to have libyang load internal ietf-yang-library module
Mgmtd makes use of libyang's internal ietf-yang-library module to add
support for said module to FRR management. Previously, mgmtd was loading
this module explicitly; however, that required that libyang's
`ietf-yang-library.yang` module definition file be co-located with FRR's
yang files so that it (and ietf-datastore.yang) would be found when
searched for by libyang using FRRs search path. This isn't always the
case depending on how the user compiles and installs libyang so mgmtd
was failing to run in some cases.

Instead of doing it the above way we simply tell libyang to load it's
internal version of ietf-yang-library when we initialize the libyang
context.

This required adding a boolean to a couple of the init functions which
is why so many files are touched (although all the changes are minimal).

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-10-07 03:32:44 +00:00
Russ White
15991e1a08
Merge pull request #16800 from donaldsharp/nhg_reuse_intf_down_up
Nhg reuse intf down up
2024-10-04 10:28:58 -04:00
Donatas Abraitis
dab1441128 tests: Check if loopback routes are considered valid for nexthop tracking
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-01 21:08:28 +03:00
Donatas Abraitis
2c6eb34af8 tests: Drop test_bgp_with_loopback_with_same_subnet_p1
It's replaced and simplified by c3fd1e9520c619babb3004cea6df622ca67b0dfa.

JSON topo is just horrible to debug.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-01 21:05:52 +03:00
Donald Sharp
421cf856ef bgpd: Cleanup multipath figuring out in bgp
Currently bgp multipath has these properties:

a) mp_info may or may not be on a single path, based
upon path perturbations in the past.
b) mp_info->count started counting at 0( meaning 1 ).  As that the
bestpath path_info was never included in the count
c) The first mp_info in the list held the multipath data associated
with the multipath.  As such if you were at any other node that data
was not filled in.
d) As such the mp_info's that are not first on the list basically
were just pointers to the corresponding bgp_path_info that was in
the multipath.
e) On bestpath calculation, a linklist(struct linklist *) of bgp_path_info's was
created.
f) This linklist was passed in to a comparison function that took the
old mpinfo list and compared it item by item to the linklist and
doing magic to figure out how to create a new mp_info list.
g) the old mp_info and the link list had to be memory managed and
freed up.
h) BGP_PATH_MULTIPATH is only set on non bestpath nodes in the
multipath.

This is really complicated.  Let's change the algorithm to this:

a) When running bestpath, mark a bgp_path_info node that could be in the ecmp path as
BGP_PATH_MULTIPATH_NEW.
b) When running multipath, just walk the list of bgp_path_info's and if
it has BGP_PATH_MULTIPATH_NEW on it, decide if it is in BGP_MULTIPATH.
If we run out of space to put in the ecmp, clear the flag on the rest.
c) Clean up the counting of sometimes adding 1 to the mpath count.
d) Only allocate a mpath_info node for the bestpath.  Clean it up
when done with it.
e) remove the unneeded list management associated with the linklist and
the mp_list.

This greatly simplifies multipath computation for bgp and reduces memory
load for large scale deployments.

2 full feeds in work_queue_run prior:

    0      56367.471      1123    50193    493695    50362    493791         0         0          0    TE   work_queue_run

BGP multipath info            :  1941844     48   110780992  1941844 110780992

2 full feeds in work_queue_run after change:

    1      52924.931      1296    40837    465968    41025    487390         0         0          1    TE   work_queue_run

BGP multipath info            :   970860     32    38836880   970866  38837120

Aproximately 4 seconds of saved cpu time for convergence and ~75 mb
smaller run time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-01 12:25:57 -04:00
Donald Sharp
6ff85fc748 tests: Clean up some logging in test_bgp_default_originate_2links.py
Test was confusing.  Add some useful data and clean up some debugs

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-01 12:25:57 -04:00
Barry A. Trent
41fa154163 tests: enhance autorp topotest
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-27 13:39:50 -07:00
Donatas Abraitis
6e4bee2d33 tests: Check if match src-peer ... can be used for incoming route-map
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-27 23:01:07 +03:00
Donatas Abraitis
791e34258f tests: Test if match src-peer ... works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-27 23:01:07 +03:00
Donatas Abraitis
f4c17673d1 tests: Check if we can see unmodified received-routes with soft inbound
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-27 14:04:59 +03:00
Y Bharath
5118fd1018 tests: catch exception during switch shutdown
Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2024-09-25 19:03:31 +05:30
Nathan Bahr
dff1db9ef6 tests: Addition of AutoRP Discovery uncovered broken PIM test
With AutoRP discovery running by default, that adds a new
IGMP group that needs to be accounted for in IGMP output.

For pim.py
  The clear IGMP interfaces function is in a broken state. It was
  already ignoring any errors and returned true always, but with
  the addition of the AutoRP discovery group, you could end up
  with a different group order in the json which would cause a key
  error making the test fail. For now I just added a check to
  avoid the key error.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-09-24 16:40:57 +00:00
Nathan Bahr
ec37f603a1 tests: Update existing tests for changes introduced by AutoRP Discovery
With AutoRP discovery running by default, that adds a new
IGMP group that needs to be accounted for in IGMP output.

For multicast_pim_sm_topo3:
  Ignore the total group number as it is unnecessary for the test.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-09-24 16:40:57 +00:00
Nathan Bahr
af45a16fce tests: Added tests for new AutoRP functionality
Uses hardcoded sample AutoRP packets injected in to test
message parsing and proper application of AutoRP learned
RP info. Tests mix of AutoRP and static RP's.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-09-24 16:40:55 +00:00
Donald Sharp
269d63a5c1
Merge pull request #16861 from btrent98/igmp-proxy2
Add igmp proxy support
2024-09-24 12:32:15 -04:00
Russ White
5cf4af6947
Merge pull request #16907 from opensourcerouting/fix/load_built-in_lua_functions
lib: Load built-in Lua functions
2024-09-24 10:56:25 -04:00
Russ White
9fa9e41613
Merge pull request #16906 from opensourcerouting/fix/match_peer_self
bgpd: Return NOMATCH only if both conf_if/group does not exist
2024-09-24 10:16:35 -04:00
Russ White
d86524951f
Merge pull request #16904 from louis-6wind/fix-zebra-rib-range
tests: fix zebra_rib range
2024-09-24 10:15:25 -04:00
Russ White
74aef8aabd
Merge pull request #16895 from opensourcerouting/fix/dual_as_topotest
tests: Simplify BGP dual-as topotest
2024-09-24 10:13:14 -04:00
Russ White
3c89cb638f
Merge pull request #16533 from acooks-at-bda/less-controversial-ospf6d-refactor-before-adding-tlvs
OSPF6: Refactor to prepare for E-LSA handling
2024-09-24 09:50:19 -04:00
Donatas Abraitis
623fb6d996 tests: Check if built-in Lua functions are working
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-24 13:40:37 +03:00
Donatas Abraitis
a4ed22b0b6 tests: Add a basic test to verify match peer ...
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-24 12:34:19 +03:00
Louis Scalbert
eb186bcdad tests: fix zebra_rib range
Range is wrong. We want values 1 and 2 but we only test 1.

> >>> for i in range(1, 2):
> ...     print(i)
> ...
> 1

Fixes: abd2a1ff3f ("tests: Test some basic kernel <-> zebra interactions")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-09-24 10:15:49 +02:00
Donald Sharp
ddbea65491 tests: Add v4/v6 forwarding off/on
There are no tests that ensured that turning off then on
v4 and v6 forwarding actually worked.  This does so.
This was found via looking at the code coverage.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-23 15:16:00 -04:00
Barry A. Trent
1425d4ac48 tests: add topotest for igmp proxy
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-23 11:43:40 -07:00
Donatas Abraitis
89644d5bf3 tests: Simplify BGP dual-as topotest
Test if we can establish a session with a global ASN directly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-23 09:49:36 +03:00
Carmine Scarpitta
81de5a5a99 tests: Add testcase for SRv6 End.DT6
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-22 07:40:50 +02:00
Carmine Scarpitta
a963eecc4f tests: Add testcase for SRv6 End.DT4
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-22 07:40:50 +02:00
Carmine Scarpitta
31376097fc tests: Add testcase for SRv6 End.DX6
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-22 07:40:50 +02:00
Carmine Scarpitta
a158a561b8 tests: Fix unused variable warning
Fix warning unused variable `router_list`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-22 07:40:50 +02:00
Jafar Al-Gharaibeh
be9ea8099e
Merge pull request #16889 from cscarpitta/fix/remove-duplicate-import-toopotest
tests: Remove duplicate `check_ping` import
2024-09-21 10:19:01 -05:00
Jafar Al-Gharaibeh
91a3d4dc32
Merge pull request #16888 from cscarpitta/fix/remove-log-monitor-cli
tests: Remove `log monitor XX ` from topotests
2024-09-21 10:18:34 -05:00
Carmine Scarpitta
253991771d tests: Remove duplicate check_ping import
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-21 11:17:01 +02:00
Carmine Scarpitta
372b8762eb tests: Remove log monitor XX from srv6_sid_manager test
`log monitor XX` command is deprecated and does nothing. Let's remove it.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-21 11:09:41 +02:00
Carmine Scarpitta
1ea13efac0 tests: Remove log monitor XX from srv6_sid_manager test
`log monitor XX` command is deprecated and does nothing. Let's remove it.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-21 11:09:41 +02:00
Carmine Scarpitta
ddd690968e tests: Remove log monitor XX from srv6_encap_src_addr test
`log monitor XX` command is deprecated and does nothing. Let's remove it.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-21 11:09:41 +02:00
Donald Sharp
8bb70ffb26 tests: Add a very basic dump bgp PATH.. topotest
None of the bgp dump code was even tested.  Add a bit
of basic stuff that it at least generates a dump file.
This can be extended at a future time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-20 13:02:51 -04:00
Enke Chen
cb5e415c2a tests: adjust topotest after bgp_redistribute_add() fix
In ospf_multi_vrf_bgp_route_leak, the admin distance for the
redistributed ospf route should be 110, and should remain as 110 after
it's imported into another vrf, and then downloaded to zebra.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2024-09-19 11:57:20 -07:00
Mark Stapp
f07579254a
Merge pull request #16857 from donaldsharp/logger_warning
tests: use logger.warning not logger.warn
2024-09-18 14:52:41 -04:00
Donald Sharp
8b25888ce8
Merge pull request #16816 from opensourcerouting/feature/bgp_dual_as
bgpd: Implement BGP dual-as feature
2024-09-18 11:59:16 -04:00
Donald Sharp
3d3c0e35eb tests: use logger.warning not logger.warn
Apparently logger.warn is being deprecated.  So let's
switch over to logger.warning.  Clearly it's better

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-18 11:56:42 -04:00
Christian Hopps
d5e4e2dfa5 tests: add test for new ietf-yang-library support
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-17 22:27:36 -04:00
Donald Sharp
ade993b629
Merge pull request #16809 from louis-6wind/fix-rcap-double-free
isisd: fix rcap tlv double-free crash
2024-09-17 08:33:43 -04:00
Donald Sharp
5a589217f8 tests: When finding nexthops ensure that they are active
Do not accept a nexthop as valid unless it is marked as being
active.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-16 09:34:05 -04:00
Donald Sharp
aab2946088
Merge pull request #16828 from enkechen-panw/print-rnh
zebra: include the prefix in nht show command
2024-09-16 09:30:53 -04:00
Louis Scalbert
cfd050a0e5 tests: update isisd fuzz test
Since the previous commit, if a router capability subTLV is not
readable, the previously read subTLVs are kept.

Update of the ISIS fuzz test.

> $ wuschl rebuild tests/isisd/test_fuzz_isis_tlv
> $ gzip -9 tests/isisd/test_fuzz_isis_tlv_tests.h

> $ ./test_fuzz_isis_tlv 2>/dev/null | grep failed
> Test 139 failed, output differs.
> Test 150 failed, output differs.
> 2 of 405 tests failed.
>
> $ ./test_fuzz_isis_tlv 139 2>/dev/null
> Test 139 failed, output differs.
> Expected output:
> Unpack log:
> Unpacking 564 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 193 and len 13.
>     Skipping unknown TLV 193 (13 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Received output:
> Unpack log:
> Unpacking 564 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 193 and len 13.
>     Skipping unknown TLV 193 (13 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Router Capability: 253.212.128.242 , D:1, S:1
>
> $ ./test_fuzz_isis_tlv 150 2>/dev/null
> Test 150 failed, output differs.
> Expected output:
> Unpack log:
> Unpacking 403 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 129 and len 13.
>     Unpacking Protocols Supported TLV...
>       Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
>   Unpacking TLV...
>     Found TLV of type 11 and len 11.
>     Skipping unknown TLV 11 (11 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
> Received output:
> Unpack log:
> Unpacking 403 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 129 and len 13.
>     Unpacking Protocols Supported TLV...
>       Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
>   Unpacking TLV...
>     Found TLV of type 11 and len 11.
>     Skipping unknown TLV 11 (11 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
> Router Capability: 253.212.128.242 , D:1, S:1

Link: https://pypi.org/project/wuschl/
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-09-16 14:53:03 +02:00
Andrew Cooks
89e18bfad1 ospf6d: move lsa structs to ospf6_lsa.h
It will be cleaner to have the LSAs in a single header and the future
TLVs in a single header.

Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Enke Chen
f6e28717ec zebra: include the prefix in nht show command
Include the prefix in "show ip nht" and "show ipv6 nht".

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2024-09-14 23:47:00 -07:00
Christian Hopps
98aaeab23c tests: fix spawning shells/vtysh on error in xdist mode
- Also fix the above and CLI when running in munet native mode

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-14 10:05:24 -04:00
Christian Hopps
68f25a1b74 tests: update munet 0.14.14, 0.14.15
- improvement to remote CLI
- 0.14.15 fixed a small bug in 0.14.14

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-14 10:05:19 -04:00
Christian Hopps
45e42c15df tests: update munet 0.14.13
- Improve remote CLI operation [improves xdist mode]

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-13 21:21:13 -04:00
Christian Hopps
bac68aba6c tests: update munet 0.14.12
- Adds retry_sleep (i.e., interval) parameter to native @retry decorator
- Fix --stdout and --stderr munet CLI args

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-13 21:21:13 -04:00
Donald Sharp
f3fc33e17b
Merge pull request #16438 from Jafaral/pim-10.1-cand-rp
PIM candidate BSR/RP support
2024-09-13 19:45:57 -04:00
Donald Sharp
5074633d05
Merge pull request #16815 from opensourcerouting/fix/adjust_wait_count_default_timers_if_too_low
tests: Adjust minimum wait/count timers for run_and_expect() if they are too low
2024-09-13 11:27:19 -04:00
Donatas Abraitis
e229b5bad3 tests: Test neighbor X no-prepend replace-as dual-as
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-13 11:28:09 +03:00
Donatas Abraitis
7cc6c9325e tests: Adjust minimum wait/count timers for run_and_expect() if they are too low
If the developer pass way too low timers, we end up with most likely false-positive
situations for random tests under a high load of the system.

It would be better to fallback to the minimum default values for such a cases.

E.g.:

```
WARNING: topo: Waiting time is too small (count=1, wait=0.5), using default values (count=20, wait=3)
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-13 10:23:51 +03:00
Donatas Abraitis
b916ed358c
Merge pull request #16779 from louis-6wind/fix-as-path-exclude
bgpd: fix as-path exclude modify crash
2024-09-13 09:38:15 +03:00
Louis Scalbert
2328d17121 tests: bgp_set_aspath_exclude extend timers
Extend timers in bgp_set_aspath_exclude in case of high load on the CI.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-09-11 18:02:52 +02:00
Louis Scalbert
e9c4b33119 tests: bgp_set_aspath_exclude check rule modif
No need to do 'no set as-path exclude' to replace the current rule by
another. The code is supposed to support the replacement.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-09-11 18:02:47 +02:00
Russ White
f48b05215a
Merge pull request #16748 from opensourcerouting/fix/issue_12502
bgpd: Validate imported routes next-hop that is in a default VRF
2024-09-10 10:17:24 -04:00
Russ White
add56c61dd
Merge pull request #15259 from dmytroshytyi-6WIND/nexthop_resolution
zebra: add LSP entry to nexthop via recursive (part 2)
2024-09-10 10:04:08 -04:00
Louis Scalbert
f102fb7aef tests: bgp_set_aspath_exclude check rule modif crash
Check that the following does not cause a crash:

> route-map r2 permit 6
>  set as-path exclude 65555
>  set as-path exclude as-path-access-list NON-EXISTING

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-09-10 15:18:00 +02:00
Jafar Al-Gharaibeh
571108e0e1 tests: don't set oif to a list if it is None
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-09 17:14:16 -05:00
Jafar Al-Gharaibeh
c1f8988a28 tests: add candidate BSR/RP topotest
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-09 17:14:16 -05:00
Christian Hopps
df2133f803 tests: add asyncio default config param to quiet warning
Update the topotest doc to the latest pytest* pkg versions
known to work together

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-09 16:35:28 -04:00
Russ White
80d3a2b120
Merge pull request #15679 from cscarpitta/test-srv6-sid-manager
tests: Add topotest to validate the sharing of an SRv6 locator among multiple protocols
2024-09-08 15:09:50 -04:00
Christian Hopps
956edf6fbf tests: log json diff output at debug level while retrying
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-07 07:13:37 -04:00
Christian Hopps
987100333a tests: optionally pass seconds_left to retrying functions
This allows retrying functions to possibly change their logging level
for diagnostics.

In order to maintain backward compatibility with this longstanding
function we catch the specific exception of it not being handled by the
retrying function and call again w/o the argument.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-07 07:09:27 -04:00
Carmine Scarpitta
c7f47536e6 tests: Add SRv6 SID Manager mem leak testcase
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:24:34 +02:00
Carmine Scarpitta
c6c8efb22c tests: Add SRv6 SID Manager ping testcase
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:24:34 +02:00
Carmine Scarpitta
f1a63df5a5 tests: Add SRv6 SID Manager VPN RIB testcase
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:24:34 +02:00
Carmine Scarpitta
d00be6af22 tests: Add SRv6 SID Manager SRv6 loc testcase
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:24:34 +02:00
Carmine Scarpitta
0a3be6a2bd tests: Add SRv6 SID Manager RIB IPv6 testcase
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:24:34 +02:00
Carmine Scarpitta
583c34c4ea tests: Add SRv6 SID Manager RIB IPv4 testcase
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:24:34 +02:00
Carmine Scarpitta
bbd59ed8a1 tests: Add SRv6 SID Manager ISIS adj testcase
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:24:34 +02:00
Carmine Scarpitta
55c9b65c89 tests: SRv6 SID Manager check rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:24:28 +02:00
Carmine Scarpitta
d6d8005395 tests: SRv6 SID Manager open json
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:24:11 +02:00
Carmine Scarpitta
1168c5a747 tests: SRv6 SID Manager check ping
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:23:56 +02:00
Carmine Scarpitta
d157212a21 tests: SRv6 SID Manager json cmp
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:23:37 +02:00
Carmine Scarpitta
fccfda2263 tests: SRv6 SID Manager teardown module
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:23:18 +02:00
Carmine Scarpitta
7d7678d251 tests: SRv6 SID Manager setup module
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:22:58 +02:00
Carmine Scarpitta
eea0da439d tests: SRv6 SID Manager build topology
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:22:39 +02:00
Carmine Scarpitta
9edf6005f6 tests: Add SRv6 SID Manager topotest
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:22:02 +02:00
Carmine Scarpitta
7b4de98caf tests: Add json to verify rt6 vpn rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
39acb03521 tests: Add json to verify rt6 vrf20 rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
ac89710bc4 tests: Add json to verify rt6 vrf10 rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
379dacdbe3 tests: Add json to verify rt6 ISIS adj
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
c9e42806ca tests: Add json to verify rt6 SRv6 locators
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
639e0c9b31 tests: Add json to verify rt6 ipv6 routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
459b974ad0 tests: Add json to verify rt6 ip routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
0b08195a31 tests: Add zebra configuration for rt6
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
e0e1dd8ac2 tests: Add sharp configuration for rt6
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
70e38f7450 tests: Add ISIS configuration for rt6
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
27d1fa8351 tests: Add BGP configuration for rt6
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
4e126ab88a tests: Add json to verify rt5 ISIS adj
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
0eb7062890 tests: Add json to verify rt5 SRv6 locators
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
1e885f0fd8 tests: Add json to verify rt5 ipv6 routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
7b156dd2c9 tests: Add json to verify rt5 ip routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
f5d8c37f0d tests: Add zebra configuration for rt5
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
42feb8d7c8 tests: Add ISIS configuration for rt5
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
a056dfd996 tests: Add json to verify rt4 ISIS adj
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
d13777e8ee tests: Add json to verify rt4 SRv6 locators
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
a7eb091662 tests: Add json to verify rt4 ipv6 routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
fa3d41963f tests: Add json to verify rt4 ip routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
f443c489d4 tests: Add zebra configuration for rt4
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
e2141d0d08 tests: Add ISIS configuration for rt4
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
25f0af0bd4 tests: Add json to verify rt3 ISIS adj
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
d23fca83f1 tests: Add json to verify rt3 SRv6 locators
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
58866a7c5b tests: Add json to verify rt3 ipv6 routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
51b5dce67a tests: Add json to verify rt3 ip routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
493b504817 tests: Add zebra configuration for rt3
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
1862b8d80c tests: Add ISIS configuration for rt3
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
5b12e45669 tests: Add json to verify rt2 ISIS adj
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
6c93cd401b tests: Add json to verify rt2 SRv6 locators
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
1e546db38e tests: Add json to verify rt2 ipv6 routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
06ca995dab tests: Add json to verify rt2 ip routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
a88d234d5c tests: Add zebra configuration for rt2
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
56a6958c92 tests: Add ISIS configuration for rt2
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
cc909c7266 tests: Add json to verify rt1 ISIS adj
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
5351018240 tests: Add json to verify rt1 SRv6 locators
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
af0499e028 tests: Add json to verify rt1 ipv6 routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
b8d40ea6d6 tests: Add json to verify rt1 ip routes
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
740c073692 tests: Add json to verify rt1 vpn rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
020fe7d766 tests: Add json to verify rt1 vrf20 rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
cb968ad782 tests: Add json to verify rt1 vrf10 rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
89b3886429 tests: Add zebra configuration for rt1
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
d305ff4e31 tests: Add sharp configuration for rt1
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
e61f48b902 tests: Add ISIS configuration for rt1
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
dc1b3c4869 tests: Add BGP configuration for rt1
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
613fd9a631 tests: Add zebra configuration for dst
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
e82f79ff75 tests: Add sharp configuration for dst
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
4de80634cc tests: Add json to verify ce6 rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
2b62990b3b tests: Add zebra configuration for ce6
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
8d171d4d32 tests: Add BGP configuration for ce6
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
afbcc80db1 tests: Add json to verify ce5 rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
f4231f36a8 tests: Add zebra configuration for ce5
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:03 +02:00
Carmine Scarpitta
fe0074ca56 tests: Add BGP configuration for ce5
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
153e5df38e tests: Add json to verify ce4 rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
95ef7956cf tests: Add zebra configuration for ce4
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
b3dc1d4b4f tests: Add BGP configuration for ce4
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
948c3a37ca tests: Add json to verify ce3 rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
9275d8423d tests: Add zebra configuration for ce3
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
7a907a9042 tests: Add BGP configuration for ce3
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
eb6458cec3 tests: Add json to verify ce2 rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
b8cc37e6fe tests: Add zebra configuration for ce2
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
0c116a5e7a tests: Add BGP configuration for ce2
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
b8121539ac tests: Add json to verify ce1 rib
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
f88c7a7d73 tests: Add zebra configuration for ce1
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Carmine Scarpitta
220f7fd588 tests: Add BGP configuration for ce1
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-06 23:08:02 +02:00
Donatas Abraitis
f3f96f95bd
Merge pull request #16746 from Jafaral/nhrp-test
tests: nhrp, use unified config, remove misleading error log
2024-09-06 09:43:00 +03:00
Donald Sharp
340d51fc3a
Merge pull request #16751 from opensourcerouting/fix/solo_peer-group
bgpd: Some peer-groups related changes/fixes
2024-09-05 17:42:20 -04:00
Martin Winter
97f14c5e5e
tests: Skip bgp_l3vpn vrf tests on 32bit systems
Tests may fail because of limited memory on 32bit system

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2024-09-05 15:57:35 +02:00
Donatas Abraitis
b63315f15d tests: Check if we can use solo with a peer-group
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-05 16:31:36 +03:00
Donatas Abraitis
014acb15d6 tests: Add valid, bestpath, and selectionReason to JSON files
They are expected in router_vrf_json_cmp_exact_filter(), because it has
exact=True.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-05 12:49:42 +03:00
Donatas Abraitis
34f7a5730b tests: Check if VPN routes can be imported with a next-hop in a default VRF
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-05 11:38:07 +03:00
Jafar Al-Gharaibeh
2054b49c40 tests: nhrp, use unified config, remove misleading error log
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-05 00:00:52 -05:00
Christian Hopps
a88f3c2d1c tests: improve example munet test
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-03 00:45:55 -04:00
Christian Hopps
08253740ef tests: fix munet native topotest runs
Enabe/fix using a munet.yaml config file for topology configuration.
Easier test writing.

This also uses the standard `frrinit.sh` to launch and teardown
FRR, so we actually test what most users use.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-03 00:45:48 -04:00
Jafar Al-Gharaibeh
745cd3e6bf
Merge pull request #16711 from donaldsharp/memory_type_stuff
Memory type stuff
2024-09-01 19:44:29 -04:00
Donatas Abraitis
2931b78537
Merge pull request #16698 from louis-6wind/fix-nhrp-redundancy
nhrpd, test: fix nhrp_redundancy topotest
2024-09-01 20:30:02 +03:00
Donald Sharp
d97c535c1e *: Create termtable specific temp memory
When trying to track down a MTYPE_TMP memory leak
it's harder to search for it when you happen to
have some usage of ttable_dump.  Let's just give
it it's own memory type so that we can avoid
confusion in the future.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-01 13:07:46 -04:00
Donald Sharp
3bf359b04e
Merge pull request #16701 from Jafaral/unified-config
tests: detect all daemons correctly when using frr.conf
2024-08-31 08:56:55 -04:00
Jafar Al-Gharaibeh
02256fd23b tests: detect all daemons correctly when using frr.conf
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-08-30 14:35:31 -05:00
Louis Scalbert
64ad1dca42 tests: use private addresses in nhrp_redundancy
Use private addresses in nhrp_redundancy.

> cd tests/topotests/nhrp_redundancy
> git grep 176.16  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|176.16|172.16|g' -i
> git grep 5.5.5.  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|5.5.5.|10.5.5.|g' -i
> git grep 4.4.4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|4.4.4.|10.4.4.|g' -i

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
94ba96747b tests: check show ip nhrp shorcut in nhrp_redundancy
Check show ip nhrp shorcut in nhrp_redundancy

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
25e10819e3 tests: fix iptables command in nhrp_redundancy
Replace --nflog-range argument by --nflog-range due to:

> 2024-08-30 10:44:54,816 INFO: topo: input: iptables -A FORWARD -i nhs3-gre0 -o nhs3-gre0 -m hashlimit --hashlimit-upto 4/minute --hashlimit-burst 1 --hashlimit-mode srcip,dstip --hashlimit-srcmask 24 --hashlimit-dstmask 24 --hashlimit-name loglimit-0 -j NFLOG --nflog-group 1 --nflog-range 128
> 2024-08-30 10:44:54,819 INFO: topo: output: warn: --nflog-range has never worked and is no longer supported, please use --nflog-size insted

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
2933d7f236 tests: fix nhs1 down check in nhrp_redundancy
Fully check the NHRP convergence after setting nhs1 down. Otherwise the
ping may pass because the previous shortcut is still present.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
432b60d194 tests: fix nhc1 route check after nhs1 down
After setting down nhs1, the test is checking that nhc1 routing table
matches routes in nhc1/nhrp_route.json. It is incorrect because it
checks that the NHRP route to nhs1 is still present but it should have
disappeared.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
7a082e04f4 tests: simplify nhrp_redundancy convergence
Simplify nhrp_redundancy convergence code. Cosmetic change.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
76d84020a8 tests: rename router variables in nhrp_redundancy
Rename router variables in nhrp_redundancy to match the actual name.
Cosmetic change to help debugging.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:22 +02:00
Louis Scalbert
5f058cdef7 tests: rename routers in nhrp_redundancy
Rename routers in nhrp_redundancy to match the diagram. Cosmetic change.

> cd tests/topotests/nhrp_redundancy
> git grep r1  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r1|nhs1|g' -i
> git grep r2  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r2|nhs2|g' -i
> git grep r3  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r3|nhs3|g' -i
> git grep r4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r4|nhc1|g' -i
> git grep r5  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r5|nhc2|g' -i
> git grep r6  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r6|router|g' -i
> git grep r7  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|r7|host|g' -i
>
> git grep R1  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R1|nhs1|g' -i
> git grep R2  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R2|nhs2|g' -i
> git grep R3  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R3|nhs3|g' -i
> git grep R4  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R4|nhc1|g' -i
> git grep R5  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R5|nhc2|g' -i
> git grep R6  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R6|router|g' -i
> git grep R7  | cut -f1 -d: | uniq | xargs -L1 sed -e 's|R7|host|g' -i
>
> mv r1 nhs1
> mv r2 nhs2
> mv r3 nhs3
> mv r4 nhc1
> mv r5 nhc2
> mv r6 router
> mv r7 host

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:59:07 +02:00
Louis Scalbert
f04191f559 tests: apply black nhrp_redundancy
Apply black nhrp_redundancy

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 14:55:34 +02:00
Louis Scalbert
43cc850def tests: fix prefix length in nhrp_redundancy
The expected prefix should be 5.5.5.0/24 otherwise the hosts behind NHRP
client 1 nhc1 (aka. r5) are not reachable via NHRP.

The issue was not seen in the FRR official CI because the tests were
skipped because iptables were missing in CI machines.

It solves the 16690 issue.

Fixes: https://github.com/FRRouting/frr/issues/16690
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-08-30 13:55:31 +02:00
Jafar Al-Gharaibeh
5752fc86ee tests: increase the timeout for packet padding check
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-08-29 11:40:50 -05:00
Jafar Al-Gharaibeh
77e1a26faa
Merge pull request #16664 from mjstapp/igor_debug_simplify
*: simplify frrlib debug
2024-08-29 11:51:53 -04:00
Mark Stapp
ac2d9bae5c
Merge pull request #16680 from donaldsharp/route_scale_minor_changes
tests: Fix route-scale at higher ecmp
2024-08-29 08:17:34 -04:00
Jafar Al-Gharaibeh
12a3d5a748
Merge pull request #16683 from donaldsharp/test_ospf_netns_vrf_failure
tests: ospf_netns_vrf should give more time for coming up
2024-08-29 01:12:40 -04:00
Jafar Al-Gharaibeh
648566c6fb
Merge pull request #16682 from donaldsharp/bgp_suppress_test
tests: Ensure bgp suppress fib has a chance to transmit data to peer
2024-08-29 01:12:17 -04:00
Jafar Al-Gharaibeh
216ed8c796
Merge pull request #16673 from donaldsharp/default_original_sin
tests: Fix bgp_default_originate_topo1_3
2024-08-28 15:30:12 -04:00
Donald Sharp
ce74a6b0a8 tests: Fix route-scale at higher ecmp
Recent commits moved the default retries to 60, but
the higher ecmp counts were over-riding to 40.  Let's
make it 80.

Noticed this when I went looking at failures on 386 platforms
in our ci.  Route scale is timing out when deleting routes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 15:18:24 -04:00
Donald Sharp
d58c44cebe tests: ospf_netns_vrf should give more time for coming up
Test fails:

            test_func = partial(
                topotest.router_json_cmp,
                router,
                "show ip ospf vrf {0}-ospf-cust1 json".format(rname),
                expected,
            )
            _, diff = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
            assertmsg = '"{}" JSON output mismatches'.format(rname)
>           assert diff is None, assertmsg
E           AssertionError: "r1" JSON output mismatches
E           assert Generated JSON diff error report:
E
E             > $->r1-ospf-cust1->areas->0.0.0.0->nbrFullAdjacentCounter: output has element with value '1' but in expected it has value '2'

/home/sharpd/frr2/tests/topotests/ospf_netns_vrf/test_ospf_netns_vrf.py:239: AssertionError

Support bundle has this data:
r1# show ip ospf vrf all neighbor
% 2024/08/28 14:55:54.763

VRF Name: r1-ospf-cust1

Neighbor ID     Pri State           Up Time         Dead Time Address         Interface                        RXmtL RqstL DBsmL
10.0.255.3        1 Full/DR         10.547s           39.456s 10.0.3.1        r1-eth1:10.0.3.2                     0     0     0
10.0.255.2        1 Full/Backup     0.543s            38.378s 10.0.3.3        r1-eth1:10.0.3.2                     1     0     0

So immediately after the test fails this test, the neighbor comes up.
Let's give the test a bit more time for failure to not happen

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 15:10:04 -04:00
Donald Sharp
3797454a2a tests: Ensure bgp suppress fib has a chance to transmit data to peer
Giving only 5 seconds to pass bgp data to peers on a heavily
loaded system is a recipe for not having fun.  Add more time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 15:05:40 -04:00
Mark Stapp
8b23abf36e
Merge pull request #16300 from donaldsharp/local_connected
Local connected
2024-08-28 14:10:14 -04:00
Donald Sharp
598d9a1f17 tests: Fix bgp_default_originate_topo1_3
This test was killing bgp on r1 and r2
and then immediately testing that the
default route transitioned.  Unfortunately
the test was written that under load the
system might be in a bad state.  Let's
modify the code to check for a bgp version
change and then that the bgp state has
come back up

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-28 11:09:32 -04:00
Igor Ryzhov
82e52e0f21 lib: common debug config output
Implement common code for debug config output and remove daemon-specific
code that is duplicated everywhere.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-27 09:53:02 -04:00
Igor Ryzhov
5dac696154 lib: rework debug init
The debug library allows to register a `debug_set_all` callback which
should enable all debugs in a daemon. This callback is implemented
exactly the same in each daemon. Instead of duplicating the code, rework
the lib to allow registration of each debug type, and implement the
common code only once in the lib.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-08-27 09:53:02 -04:00
Mark Stapp
17fffbad1b
Merge pull request #16656 from donaldsharp/minor_fix_for_pim_dr_nondr
tests: Allow convergence before adding multicast routes
2024-08-27 08:17:46 -04:00
Donald Sharp
37dd51867f tests: Add some tests to show new behavior works as expected
a) A noprefix address by itself should not create a connected route.
   This was pre-existing.
b) A noprefix address with a corresponding route should result in a
   connected route.  This is how NetworkManager appears to work.
   This is new behavior, so a new test.
c) A route is added to the system from someone else.
   This is new behavior, so a new test.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-27 06:25:34 -04:00
Jafar Al-Gharaibeh
0d745741c9 tests: Fix frequent ospfv3 basic functionality test failure
The dead timer is set to 4 seconds, while the hello interval is set to 6535.
This test will only pass of the platform is fast enough for ospfv3 to
converge in 4 seconds. These timers were already tested multiple time earlier.
This test should just make sure that the boundary value 65535 is configurable,

Other changes in this commit:
  - add sequence numbers to the dead intervals tests to make it easier to
    track test faliures.
  - swap the config order in one test to match order with all other tests.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-08-26 16:35:37 -05:00
Donald Sharp
3c4ffcacfe tests: Allow convergence before adding multicast routes
Current code adds a new vlan interface, sets up ospf and
pim on it and immediately starts shoving data down the pipes.
This of course has the fun thing where the IGP and pim do not
always come up in a nice neat manner and the test is looking
for state from a nice neat come up, even though pim is `working`
correctly it is not correct for what the test wants.

Modify the code to ensure that ospf is up and has propagated
the route where it is needed as well as that pim neighbors have
properly come up, then initiate the multicast streams and igmp
reports.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-26 16:02:46 -04:00
Donald Sharp
3d8ccdb115
Merge pull request #16615 from Jafaral/revert-v4-v6-bgp
Revert ipv4-mapped ipv6 and 6vpe nexthop in BGP
2024-08-22 17:57:38 -04:00
Jafar Al-Gharaibeh
741c030395 Revert "Merge pull request #15368 from louis-6wind/fix-6pe"
This reverts commit df98e88368, reversing
changes made to b652119235.
2024-08-22 10:38:09 -05:00
Donald Sharp
05c17eff06
Merge pull request #16450 from nabahr/static_joins
PIM: Implement static IGMP joins without an IGMP report
2024-08-22 11:32:56 -04:00
Jafar Al-Gharaibeh
879460ce27
Merge pull request #16613 from donaldsharp/weight_issues
Weight issues
2024-08-22 11:19:54 -04:00
Jafar Al-Gharaibeh
db71bebc2a
Merge pull request #16620 from LabNConsulting/new-munet-0-14-10
tests: update munet to 0.14.10
2024-08-22 11:14:18 -04:00
Donatas Abraitis
18e2d0d1a9
Merge pull request #16621 from LabNConsulting/fix-grpc-client
tests: dont print sys.path when running grpc-query.py
2024-08-22 09:41:34 +02:00
Christian Hopps
436e4d9755 tests: dont print sys.path when running grpc-query.py
Don't print the sys.path when running grpc-query.py. Doing so
was causing tests to fail.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-08-21 22:07:25 -04:00
Christian Hopps
cff1103843 tests: update munet to 0.14.10
Changes:

- mutini: handle possible missed zombie cleanup leading to test hangs
- mutini: also we avoid logging in the signal handler which was causing
  an exception.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-08-21 21:05:48 -04:00
Jafar Al-Gharaibeh
0097489b4a Revert "Merge pull request #15614 from louis-6wind/fix-6pe-address"
This reverts commit b3600d82dc, reversing
changes made to 51119823d0.
2024-08-21 13:37:43 -05:00
Jafar Al-Gharaibeh
0d2d20825e Revert "Merge pull request #16439 from louis-6wind/fix-ipv4-mapped-ipv6"
This reverts commit cc0fdd3b1d, reversing
changes made to 4e208087fd.
2024-08-21 13:26:50 -05:00
Donald Sharp
b62de7de2e zebra, tests: Connected and Local routes should have a weight of 1
All routes received by zebra from upper level protocols have a weight
of 1.  Let's just make everything extremely consistent in our code.
Lot's of tests needed to be fixed up to make this work.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-21 10:17:47 -04:00
Dmytro Shytyi
e23005f407 topotest: test_bgp_snmp_bgpv4v2_notification
This test checks the bgp crash on rt2 when 2 commands
launched consequently:
T0: rr, config -> router bgp 65004 -> neighbor 192.168.12.2 password 8888
T1: rt2, snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.7336.4.2.1
T2: test if rt2 bgp is crashed.

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
2024-08-21 15:27:12 +02:00
Nathan Bahr
7ce2a1b8fb tests: Added new topotest for pim igmp static groups
Copied the existing "join-group" test and modified to test
static groups instead. Functionally the same but without IGMP
reports.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-08-15 17:10:32 +00:00
Mark Stapp
6de80911b0
Merge pull request #16586 from donaldsharp/fix_route_scale_startup
tests: Fix route_scale startup issues
2024-08-15 09:21:12 -04:00
Donald Sharp
b0c86804f8 tests: Fix route_scale startup issues
Upstream CI is frequently running into a situation where
the routes are not being installed.  These routes
start at the beginning and suddenly in the middle
they start working properly.

D   1.0.15.183/32 [150/0] via 192.168.0.1, r1-eth0 inactive, weight 1, 00:10:17
                          via 192.168.1.1, r1-eth1 inactive, weight 1, 00:10:17
D   1.0.15.184/32 [150/0] via 192.168.0.1, r1-eth0 inactive, weight 1, 00:10:17
                          via 192.168.1.1, r1-eth1 inactive, weight 1, 00:10:17
D   1.0.15.185/32 [150/0] via 192.168.0.1, r1-eth0 inactive, weight 1, 00:10:17
                          via 192.168.1.1, r1-eth1 inactive, weight 1, 00:10:17
D>* 1.0.15.186/32 [150/0] via 192.168.0.1, r1-eth0, weight 1, 00:10:17
  *                       via 192.168.1.1, r1-eth1, weight 1, 00:10:17
D>* 1.0.15.187/32 [150/0] via 192.168.0.1, r1-eth0, weight 1, 00:10:17
  *                       via 192.168.1.1, r1-eth1, weight 1, 00:10:17
D>* 1.0.15.188/32 [150/0] via 192.168.0.1, r1-eth0, weight 1, 00:10:17

Turning on some debugs showed that the failed installed routes are
trying to be matched against the default route.  Thus implying
all the connected routes for the test are not yet successfully
installed.  Let's modify the test(s) on startup to just ensure
that the connected routes are installed correctly.  I am no
longer seeing the problem after this change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-14 10:18:41 -04:00
Mark Stapp
dd146614df tests: add retries to nhg tests in all_proto_startup
The all_protocol_startup topotest needs to allow for some delay
between configuring nexthop-groups and their installation. Add
some wait periods in a couple of nhg test cases.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-08-14 08:37:00 -04:00
Donald Sharp
1563d9f9c8 tests: Fix bgp_duplicate_nexthop python warning
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-08-12 13:55:26 -04:00
Donald Sharp
c4fdc837c0
Merge pull request #16534 from opensourcerouting/fix/start_ldpd_if_unified
doc: Document on how to start specific daemons with unified config in topotests
2024-08-12 10:25:54 -04:00
Donatas Abraitis
cc0fdd3b1d
Merge pull request #16439 from louis-6wind/fix-ipv4-mapped-ipv6
bgpd: fixes for ipv4 mapped ipv6 address
2024-08-12 15:37:36 +03:00
Donatas Abraitis
79cbde8095 tests: Convert self.unified_config to boolean
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-08-11 13:32:11 +03:00
Christian Hopps
2ee9f4d11f tests: wait for test client to connect before running test
Vtysh has been improved to startup very quickly this exposed a race in this
test, where the `clear ip rip...` command ran before the test client that
handles it had finished connecting to mgmtd. Add a retried check for the test
client being connected before issuing the `clear ip rip ...` test command.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-08-07 09:35:52 -04:00
Mark Stapp
975e1a36f6
Merge pull request #16501 from donaldsharp/preprocess_vtysh
Preprocess vtysh
2024-08-02 07:27:04 -04:00
Donald Sharp
9af1f5e823 tests: need aggressive timers in bgp_prefix_list_any
Add some timers to make convergence happan as fast as possible
when a connection fails on the intial attempt.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-31 11:44:06 -04:00
Donald Sharp
b52346efe4 tests: need aggressive timers in bgp_route_map_match_ipv6_nexthop
Add some timers to make the convergence happen as fast as possible
when a connection fails on the initial attempt.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-31 11:01:54 -04:00
Donald Sharp
08bf9cd9f5 tests: Shorten reconnect timer when something goes wrong
When running bfd_bgp_cbit_topo3 and an intial connection
goes wrong, try to connect again as fast as possible as
that the timer is 2 minutes otherwise and the test will
never come back from it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-31 10:47:12 -04:00
Donald Sharp
6f2aea5a13 tests: Increase route_scale timeouts
This test is frequently failing in the upstream CI.  Most
log failures are stating that we expected something like
1 million routes but we have 900k+.  Looks like the system
is just loaded a bit more than expected.  Let's give these
tests a bit more time to complete.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-31 10:45:38 -04:00
David Lamparter
4bc41193e8 vtysh, lib: preprocess CLI graphs
Store a parsed and built graph of the CLI nodes in vtysh, rather than
parsing and building that graph every time vtysh starts up.

This provides a 3x to 5x reduction in vtysh startup overhead:

`vtysh -c 'configure' -c 'interface lo' -c 'do show version'`

- before: 92.9M cycles, 1114 samples
- after: 16.5M cycles, 330 samples

This improvement is particularly visible for users scripting `vtysh -c`
calls, which notably includes topotests.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-07-31 08:08:53 -04:00
Rafael Zalamena
e900c9ba31 topotests: test MSDP authentication
Modify existing MSDP topology to use authentication.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-07-29 11:41:39 -03:00
Donald Sharp
1877596ebc
Merge pull request #12484 from opensourcerouting/msdp-filter
pimd: MSDP SA filtering support
2024-07-29 10:25:14 -04:00
Donald Sharp
bc50bcb4cf
Merge pull request #16492 from LabNConsulting/ziemba/topotests-lib-bgprib-wait
tests: topotests/lib: add wait to RequireVpnRoutes, RequireUnicastRoutes
2024-07-29 07:56:00 -04:00
Donald Sharp
9ce5a04882
Merge pull request #16490 from adrianomarto/master
tests: Test MSDP RPF
2024-07-28 15:27:45 -04:00
G. Paul Ziemba
460703f3e8 tests: add wait to RequireVpnRoutes, RequireUnicastRoutes
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2024-07-28 09:00:49 -07:00
Adriano Marto Reis
e64d15b17a tests: Test MSDP RPF
Adding a MSDP test with multiple possible routes.

Signed-off-by: "Adriano Marto Reis" <adrianomarto@gmail.com>
2024-07-28 14:34:24 +10:00
Rafael Zalamena
7b650fb836 topotests: test MSDP SA filtering
Modify existing MSDP topology to use test SA filtering:
- Add new multicast host (so we get two sources for same group)
- Test group only filtering
- Test source / group filtering

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-07-27 11:32:51 -03:00
Donald Sharp
ce3cea38dd tests: Run black on bgp_vpnv[4|6]_per_nexthop_label
I did not have my formatting right, let's get it
right for these two.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-26 14:19:53 -04:00
Donald Sharp
77a296cb08 tests: Fix test_bgp_vpnv6_per_nexthop_label.py to handle timing changes
So the test script is making changes to a vpn configuration by
changing something fundamental about the vpn.  This is causing
a window where routes we are interested in are:
present ( from pre-change ) then
withdrawn ( the test change causes this ) then
present ( with the new data )

The test code was trying to test for this by checking
to see if the prefix was there, but due to timing issues
it's not always there when we look for it.

Modify the test to get the vpn table version prior to
the change( as that it should not be moving around ) and
then change the test for the prefix to look for a version
that is later than the vpn's table version.  Then we know
that it is *after* everything has stabilized again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-26 14:19:49 -04:00
Donald Sharp
6914cceea2 tests: Fix test_bgp_vpnv4_per_nexthop_label.py to handle timing changes
So the test script is making changes to a vpn configuration by
changing something fundamental about the vpn.  This is causing
a window where routes we are interested in are:
present ( from pre-change ) then
withdrawn ( the test change causes this ) then
present ( with the new data )

The test code was trying to test for this by checking
to see if the prefix was there, but due to timing issues
it's not always there when we look for it.

Modify the test to get the vpn table version prior to
the change( as that it should not be moving around ) and
then change the test for the prefix to look for a version
that is later than the vpn's table version.  Then we know
that it is *after* everything has stabilized again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-26 14:19:43 -04:00
Donald Sharp
c682ddd100 tests: Increase timing of bgp_duplicate_nexthop
a) Make timers more aggressive for this test
b) Double run_and_expect time for one sub test.

These two changes cause this test to pass regularly for
me when this test used to fail regularly for me.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-26 14:19:39 -04:00
Donatas Abraitis
23c756ce68
Merge pull request #16472 from donaldsharp/msdp_bug
pimd: Fix msdp setting of sa->rp
2024-07-25 21:09:19 +03:00
Donald Sharp
c4b4c242ec pimd: Fix msdp setting of sa->rp
The code is clearly incorrect.  After consultation with
the original author this is the decided change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-25 07:50:32 -04:00
Donald Sharp
bd86964db8
Merge pull request #16455 from opensourcerouting/fix/bgp_gr_notifications_timing_flake
tests: Delay initial OPEN after we do `clear bgp`
2024-07-24 13:17:31 -04:00
Donald Sharp
b2654e35e5
Merge pull request #16232 from zhou-run/202406171755
isisd: Even after configuring "no hostname dynamic", the topology still displays the hostname.
2024-07-24 10:30:34 -04:00
Donald Sharp
a694be6019
Merge pull request #16240 from y-bharath14/srib-topotest-f
tests: Avoid using unused modules and variables at FRR test suites
2024-07-24 10:28:43 -04:00
Donatas Abraitis
91e67abb61 tests: Delay initial OPEN after we do clear bgp
Under some circumstances it might happen that the session is quickly UP in the
middle of `clear bgp ...` and `shutdown`. That leads to session be UP, and
the stale routes being cleared quickly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-24 14:30:32 +03:00
Louis Scalbert
d618436211 topotests: bgp_nexthop_mp_ipv4_6, test ipv4-mapped
Test that a IPv4-mapped IPv6 is sent from a peer that has no global IPv6
address.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-07-24 10:20:11 +02:00
Russ White
fba472e848
Merge pull request #16376 from c-po/ospfd-ldp-sync
ospfd: fix internal ldp-sync state flags when feature is disabled
2024-07-23 10:51:46 -04:00
Russ White
9db9128c27
Merge pull request #16330 from donaldsharp/nhg_going_down
zebra: Properly note that a nhg's nexthop has gone down
2024-07-23 10:49:49 -04:00
Donatas Abraitis
8eb78b2d89
Merge pull request #16341 from crosser/preserve-needed-rmacs
zebra: evpn: not coerce VTEP IP to IPv4 in nh_list
2024-07-22 02:53:26 -07:00
Carmine Scarpitta
e3282e26e4 tests: Fix warnings in bgp_srv6l3vpn_to_bgp_vrf3
When performing the `bgp_srv6l3vpn_to_bgp_vrf3` topotest, the following
warnings are observed:

```
2024-07-21 08:01:51,390 WARNING: r1: Router(r1): proc failed: rc 127 pid 52974
	args: /usr/bin/nsenter --mount=/proc/52322/ns/mnt --net=/proc/52322/ns/net --uts=/proc/52322/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,522 WARNING: r2: Router(r2): proc failed: rc 127 pid 52984
	args: /usr/bin/nsenter --mount=/proc/52397/ns/mnt --net=/proc/52397/ns/net --uts=/proc/52397/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/r2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,632 WARNING: ce1: Router(ce1): proc failed: rc 127 pid 52994
	args: /usr/bin/nsenter --mount=/proc/52472/ns/mnt --net=/proc/52472/ns/net --uts=/proc/52472/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,757 WARNING: ce2: Router(ce2): proc failed: rc 127 pid 53004
	args: /usr/bin/nsenter --mount=/proc/52547/ns/mnt --net=/proc/52547/ns/net --uts=/proc/52547/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,878 WARNING: ce3: Router(ce3): proc failed: rc 127 pid 53014
	args: /usr/bin/nsenter --mount=/proc/52622/ns/mnt --net=/proc/52622/ns/net --uts=/proc/52622/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce3/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce3/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,997 WARNING: ce4: Router(ce4): proc failed: rc 127 pid 53024
	args: /usr/bin/nsenter --mount=/proc/52697/ns/mnt --net=/proc/52697/ns/net --uts=/proc/52697/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce4/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce4/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,109 WARNING: ce5: Router(ce5): proc failed: rc 127 pid 53034
	args: /usr/bin/nsenter --mount=/proc/52772/ns/mnt --net=/proc/52772/ns/net --uts=/proc/52772/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce5/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce5/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,225 WARNING: ce6: Router(ce6): proc failed: rc 127 pid 53044
	args: /usr/bin/nsenter --mount=/proc/52847/ns/mnt --net=/proc/52847/ns/net --uts=/proc/52847/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce6/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/ce6/setup.sh: No such file or directory
	stderr: *empty*
````

This occurs because the topotest attempts to execute the `setup.sh`
file, and the file does not exist.

Let's fix the issue by checking if the `setup.sh` file exists and
executing it only if it does.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-21 09:43:06 +02:00
Carmine Scarpitta
5d76346266 tests: Fix warnings in bgp_srv6l3vpn_to_bgp_vrf2
When performing the `bgp_srv6l3vpn_to_bgp_vrf2` topotest, the following
warnings are observed:

```
2024-07-21 08:01:51,390 WARNING: r1: Router(r1): proc failed: rc 127 pid 52974
	args: /usr/bin/nsenter --mount=/proc/52322/ns/mnt --net=/proc/52322/ns/net --uts=/proc/52322/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,522 WARNING: r2: Router(r2): proc failed: rc 127 pid 52984
	args: /usr/bin/nsenter --mount=/proc/52397/ns/mnt --net=/proc/52397/ns/net --uts=/proc/52397/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/r2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,632 WARNING: ce1: Router(ce1): proc failed: rc 127 pid 52994
	args: /usr/bin/nsenter --mount=/proc/52472/ns/mnt --net=/proc/52472/ns/net --uts=/proc/52472/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,757 WARNING: ce2: Router(ce2): proc failed: rc 127 pid 53004
	args: /usr/bin/nsenter --mount=/proc/52547/ns/mnt --net=/proc/52547/ns/net --uts=/proc/52547/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,878 WARNING: ce3: Router(ce3): proc failed: rc 127 pid 53014
	args: /usr/bin/nsenter --mount=/proc/52622/ns/mnt --net=/proc/52622/ns/net --uts=/proc/52622/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce3/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce3/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,997 WARNING: ce4: Router(ce4): proc failed: rc 127 pid 53024
	args: /usr/bin/nsenter --mount=/proc/52697/ns/mnt --net=/proc/52697/ns/net --uts=/proc/52697/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce4/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce4/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,109 WARNING: ce5: Router(ce5): proc failed: rc 127 pid 53034
	args: /usr/bin/nsenter --mount=/proc/52772/ns/mnt --net=/proc/52772/ns/net --uts=/proc/52772/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce5/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce5/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,225 WARNING: ce6: Router(ce6): proc failed: rc 127 pid 53044
	args: /usr/bin/nsenter --mount=/proc/52847/ns/mnt --net=/proc/52847/ns/net --uts=/proc/52847/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce6/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/ce6/setup.sh: No such file or directory
	stderr: *empty*
````

This occurs because the topotest attempts to execute the `setup.sh`
file, and the file does not exist.

Let's fix the issue by checking if the `setup.sh` file exists and
executing it only if it does.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-21 09:42:52 +02:00
Carmine Scarpitta
44ee7a4abe tests: Fix warnings in bgp_srv6l3vpn_to_bgp_vrf
When performing the `bgp_srv6l3vpn_to_bgp_vrf` topotest, the following
warnings are observed:

```
2024-07-21 08:01:51,390 WARNING: r1: Router(r1): proc failed: rc 127 pid 52974
	args: /usr/bin/nsenter --mount=/proc/52322/ns/mnt --net=/proc/52322/ns/net --uts=/proc/52322/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,522 WARNING: r2: Router(r2): proc failed: rc 127 pid 52984
	args: /usr/bin/nsenter --mount=/proc/52397/ns/mnt --net=/proc/52397/ns/net --uts=/proc/52397/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,632 WARNING: ce1: Router(ce1): proc failed: rc 127 pid 52994
	args: /usr/bin/nsenter --mount=/proc/52472/ns/mnt --net=/proc/52472/ns/net --uts=/proc/52472/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce1/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce1/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,757 WARNING: ce2: Router(ce2): proc failed: rc 127 pid 53004
	args: /usr/bin/nsenter --mount=/proc/52547/ns/mnt --net=/proc/52547/ns/net --uts=/proc/52547/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce2/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce2/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,878 WARNING: ce3: Router(ce3): proc failed: rc 127 pid 53014
	args: /usr/bin/nsenter --mount=/proc/52622/ns/mnt --net=/proc/52622/ns/net --uts=/proc/52622/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce3/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce3/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:51,997 WARNING: ce4: Router(ce4): proc failed: rc 127 pid 53024
	args: /usr/bin/nsenter --mount=/proc/52697/ns/mnt --net=/proc/52697/ns/net --uts=/proc/52697/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce4/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce4/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,109 WARNING: ce5: Router(ce5): proc failed: rc 127 pid 53034
	args: /usr/bin/nsenter --mount=/proc/52772/ns/mnt --net=/proc/52772/ns/net --uts=/proc/52772/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce5/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce5/setup.sh: No such file or directory
	stderr: *empty*
2024-07-21 08:01:52,225 WARNING: ce6: Router(ce6): proc failed: rc 127 pid 53044
	args: /usr/bin/nsenter --mount=/proc/52847/ns/mnt --net=/proc/52847/ns/net --uts=/proc/52847/ns/uts -F /bin/bash -c /bin/bash /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce6/setup.sh
	stdout: /bin/bash: /media/workspace/frr/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/ce6/setup.sh: No such file or directory
	stderr: *empty*
````

This occurs because the topotest attempts to execute the `setup.sh`
file, and the file does not exist.

Let's fix the issue by checking if the `setup.sh` file exists and
executing it only if it does.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-21 09:42:32 +02:00
Nathan Bahr
ddc1c2eeae tests: OSPFv3 hello tests investigation, make assert output unique
These failing tests are hard to track down. Added numbering to each assert
to easily tell where the test fails.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-07-17 12:37:06 -05:00
Christian Breunig
5a70378a47 ospfd: fix internal ldp-sync state flags when feature is disabled
When enabling "mpls ldp-sync" under "router ospf" ospfd configures
SET_FLAG(ldp_sync_info->flags, LDP_SYNC_FLAG_IF_CONFIG) so internally knowing
that the ldp-sync feature is enabled. However the flag is not cleared when
turning of the feature using "nompls ldp-sync"!

https://github.com/FRRouting/frr/issues/16375

Signed-off-by: Christian Breunig <christian@breunig.cc>
2024-07-17 10:31:15 +02:00
Donatas Abraitis
c6c0403c61 tests: Check if VRF instance has a different ASN than a default VRF
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-15 16:10:57 +03:00
Donatas Abraitis
7540364e58 tests: Check if multiple VRF instances can have different ASNs
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-15 16:10:57 +03:00
Y Bharath
5b06a17715 tests: Refactoring FRR test suites
Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2024-07-15 13:09:32 +05:30
Jafar Al-Gharaibeh
ad7a1f9487 tests: tweak timers to avoid frequent failures on slow CI hardware
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-07-12 11:36:52 -05:00
Russ White
52376aa4b6
Merge pull request #16229 from anlancs/ripd/fix-header-show
ripd/ripngd: use common header for display command
2024-07-09 16:12:30 -04:00
Mark Stapp
7d08b29721
Merge pull request #16342 from pguibert6WIND/duplicate_fib_proposal
Duplicate fib proposal
2024-07-09 13:48:37 -04:00
Russ White
685712df44
Merge pull request #16241 from zhou-run/202406191740
isisd: The neighbor entry still displays the deleted hostname of the neighbor.
2024-07-09 11:40:26 -04:00