Commit Graph

3911 Commits

Author SHA1 Message Date
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