The `srv6_encap_src_addr` runs a vtysh command to configure the SRv6
encapsulation source address and then immediately invokes an iproute2
command to verify that zebra has set this address in the kernel. There
is no wait between the two operations and the verification is attempted
only once. If the topotest does not find the expected address it fails
immediately.
The problem is that when topotest is run on a heavyily loaded system,
it can take some time for zebra to set the address in the kernel.
In this case, when the topotest checks the kernel address right after
running the vtysh command, it doesn't find the expected address because
zebra hasn't set it yet.
This commit gives zebra some time to configure the address. It keeps to
check that the address is the expected one for about 1 minute. If after
1 minute the address is not the expected one then the test fails.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
The `srv6_encap_src_addr` topotest uses a waiting time that is too
small. For this reason during startup it prints a warning:
```
2025-02-16 09:23:47,704 WARNING: topo: Waiting time is too small (count=10, wait=1), using default values (count=20, wait=3)
```
This commit increases the waiting time to fix the warning.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
The `srv6_encap_src_addr` topotest tries to load bgpd.conf file that
does not exist, which produces the following warning:
```
2025-02-16 09:23:35,151 WARNING: topo: missing config 'r1' for '/media/frr/tests/topotests/srv6_encap_src_addr/r1/bgpd.conf' creating empty file '/etc/frr/bgpd.conf'
```
Since this topotest doesn't actually use bgpd, there's no point in
loading the config file.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
The `srv6_encap_src_addr` topotest tries to load sharpd.conf file that
does not exist, which produces the following warning:
```
2025-02-16 09:23:35,151 WARNING: topo: missing config 'r1' for '/media/frr/tests/topotests/srv6_encap_src_addr/r1/sharpd.conf' creating empty file '/etc/frr/sharpd.conf'
```
Since this topotest doesn't actually use sharpd, there's no point in
loading the config file.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
It's just annoying when the linter tells to apply the formatting for the code
you didn't touch.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Add a new topotest `srv6_encap_src_addr` which verifies that the
`source-address` command works properly.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>