diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2025-01-13 15:41:32 +0100 | 
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2025-01-22 17:16:53 +0100 | 
| commit | 2610c0783117625019ccfbe94c715fb4e9f05a69 (patch) | |
| tree | f813a42e2b95c5a9dc3b0601b20f2e67a06354d4 /tests | |
| parent | c6c570a7e64eb87fbb7c634487c0be02a6d5608b (diff) | |
isis_srv6_topo1: fix ping does not work as expected
The ping test does not detect when the command fails.
> 2025-01-13 15:38:27,494 INFO: topo: [+] check rt1 fc00:0:9::1 0% packet loss
> 2025-01-13 15:38:27,494 WARNING: topo: Waiting time is too small (count=10, wait=1), using default values (count=20, wait=3)
> 2025-01-13 15:38:28,501 WARNING: rt1: Router(rt1): proc failed: rc 1 pid 2028454
> 	args: /usr/bin/nsenter --mount=/proc/2026950/ns/mnt --net=/proc/2026950/ns/net --uts=/proc/2026950/ns/uts -F --wd=/tmp/topotests/isis_srv6_topo1.test_isis_srv6_topo1/rt1 /bin/bash -c ping6 fc00:0:9::1 -c 1 -w 1
> 	stdout: PING fc00:0:9::1(fc00:0:9::1) 56 data bytes
>
> --- fc00:0:9::1 ping statistics ---
> 1 packets transmitted, 0 received, 100% packet loss, time 0ms
> 	stderr: *empty*
> 2025-01-13 15:38:28,501 INFO: topo: PING fc00:0:9::1(fc00:0:9::1) 56 data bytes
>
> --- fc00:0:9::1 ping statistics ---
> 1 packets transmitted, 0 received, 100% packet loss, time 0ms
>
>
> PASSED
>
The match string is not precise enough. Complete it.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/topotests/isis_srv6_topo1/test_isis_srv6_topo1.py | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/topotests/isis_srv6_topo1/test_isis_srv6_topo1.py b/tests/topotests/isis_srv6_topo1/test_isis_srv6_topo1.py index 9c1a23f54f..035c60c9a3 100644 --- a/tests/topotests/isis_srv6_topo1/test_isis_srv6_topo1.py +++ b/tests/topotests/isis_srv6_topo1/test_isis_srv6_topo1.py @@ -245,7 +245,7 @@ def check_ping6(name, dest_addr, expect_connected):          if match not in output:              return "ping fail" -    match = "{} packet loss".format("0%" if expect_connected else "100%") +    match = "{} packet loss".format(", 0%" if expect_connected else ", 100%")      logger.info("[+] check {} {} {}".format(name, dest_addr, match))      tgen = get_topogen()      func = functools.partial(_check, name, dest_addr, match)  | 
