From 44ee7a4abe7f0a7fd56de75f762d328a63ec418c Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Sun, 21 Jul 2024 09:36:28 +0200 Subject: [PATCH 1/3] 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 --- .../bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py index 5d18083fd5e3..a6938668ad3b 100755 --- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py +++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py @@ -92,7 +92,8 @@ def setup_module(mod): tgen.start_topology() router_list = tgen.routers() for rname, router in tgen.routers().items(): - router.run("/bin/bash {}/{}/setup.sh".format(CWD, rname)) + if os.path.exists("{}/{}/setup.sh".format(CWD, rname)): + router.run("/bin/bash {}/{}/setup.sh".format(CWD, rname)) router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) ) From 5d76346266e3db37501494400ac96b714ebffc32 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Sun, 21 Jul 2024 09:36:47 +0200 Subject: [PATCH 2/3] 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 --- .../test_bgp_srv6l3vpn_to_bgp_vrf2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/test_bgp_srv6l3vpn_to_bgp_vrf2.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/test_bgp_srv6l3vpn_to_bgp_vrf2.py index 38baf434426d..3e21875503db 100755 --- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/test_bgp_srv6l3vpn_to_bgp_vrf2.py +++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/test_bgp_srv6l3vpn_to_bgp_vrf2.py @@ -56,7 +56,8 @@ def setup_module(mod): tgen = Topogen(build_topo, mod.__name__) tgen.start_topology() for rname, router in tgen.routers().items(): - router.run("/bin/bash {}/{}/setup.sh".format(CWD, rname)) + if os.path.exists("{}/{}/setup.sh".format(CWD, rname)): + router.run("/bin/bash {}/{}/setup.sh".format(CWD, rname)) router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) ) From e3282e26e44573dd261da9c02c62e520912c101c Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Sun, 21 Jul 2024 09:37:06 +0200 Subject: [PATCH 3/3] 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 --- .../test_bgp_srv6l3vpn_to_bgp_vrf3.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py index 92a30788fc4b..2400cd285349 100644 --- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py +++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py @@ -53,7 +53,8 @@ def setup_module(mod): tgen = Topogen(build_topo, mod.__name__) tgen.start_topology() for rname, router in tgen.routers().items(): - router.run("/bin/bash {}/{}/setup.sh".format(CWD, rname)) + if os.path.exists("{}/{}/setup.sh".format(CWD, rname)): + router.run("/bin/bash {}/{}/setup.sh".format(CWD, rname)) router.load_config( TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)) )