From 4fb336424ea6a006127f7277ece30949aee29d05 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 Mar 2024 18:29:31 -0400 Subject: [PATCH 1/2] zebra: rtadv uses uninited data to sendmsg valgrind is complaining about this problem. This fixes it. Signed-off-by: Donald Sharp --- zebra/rtadv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 6aca643bd8e2..470391de9be2 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -184,13 +184,13 @@ static int rtadv_recv_packet(struct zebra_vrf *zvrf, int sock, uint8_t *buf, static void rtadv_send_packet(int sock, struct interface *ifp, enum ipv6_nd_suppress_ra_status stop) { - struct msghdr msg; - struct iovec iov; + struct msghdr msg = { 0 }; + struct iovec iov = { 0 }; struct cmsghdr *cmsgptr; struct in6_pktinfo *pkt; - struct sockaddr_in6 addr; - unsigned char buf[RTADV_MSG_SIZE]; - char adata[RTADV_ADATA_SIZE]; + struct sockaddr_in6 addr = { 0 }; + unsigned char buf[RTADV_MSG_SIZE] = { 0 }; + char adata[RTADV_ADATA_SIZE] = { 0 }; struct nd_router_advert *rtadv; int ret; From ea570f2aa68494dbbf4947f59b261bde3184ca76 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 Mar 2024 19:30:41 -0400 Subject: [PATCH 2/2] tests: Cleanup generate_support_bundle() to not fail The Support bundle generation was/is failing in both our upstream ci and locally. This cleans up the failures that I am seeing such that tests now continue to run instead of aborting the test run. Signed-off-by: Donald Sharp --- tests/topotests/lib/common_config.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index 598db84e636b..7787b6f74b1d 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -936,14 +936,26 @@ def generate_support_bundle(): """ tgen = get_topogen() + if tgen is None: + logger.warn( + "Support bundle attempted to be generated, but topogen is not being used" + ) + return True + router_list = tgen.routers() test_name = os.environ.get("PYTEST_CURRENT_TEST").split(":")[-1].split(" ")[0] bundle_procs = {} for rname, rnode in router_list.items(): logger.info("Spawn collection of support bundle for %s", rname) - dst_bundle = "{}/{}/support_bundles/{}".format(tgen.logdir, rname, test_name) - rnode.run("mkdir -p " + dst_bundle) + try: + dst_bundle = "{}/{}/support_bundles/{}".format( + tgen.logdir, rname, test_name + ) + rnode.run("mkdir -p " + dst_bundle) + except Exception as err: + logger.error("Generation of Support bundle failed {}".format(err)) + return True gen_sup_cmd = [ "/usr/lib/frr/generate_support_bundle.py",