From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795878519; b=LdYpCWMXy456Z1Wt+lu1z3tz1cwTAEfXo6nnkpy9X7yRlqfhUfVBK0KO5D1YcJYp1Eoi WmVrmdPI/s8y+5HQmNLj3C16uUPvpDSrDIpWqQsnLzG447DSd27s5MduCCgaDrluxPr+U HJztSeCaEyyDOpsmU1tFgKLZ88rwK9NPkEdhOEyH5C9gXf6r4NO65qdWtnY/u2rl/ld/A J1cuRIZFkNoFpQUQ3g9X4pw2psoGJwPvxE27DFQGew7FNcFnmVUcg9vIkFQLC0iXz+xll 62FZLld+GMNThJ1PoFmm+eTzy3d/G4xjN9MFdhr6NV32DOYnQryksG38Sgd099Ustcw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795878519; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=KByFkq80/W8HwWeYva3/faNNZPdr67a+Zot4Kn/R/l0=; b=RHZr+T6wtNaBZxGiJULFtPAT3HKw4iNKzleU/vh4SnWIwMKr4W1fiN6oHM5ATai35UB3 27bL4wqdzwxtjPmGEmYdrayr+IUXd6nvzHvD2cgbMaEZiFyidVsBx0jbUJpslDoe9TGkb GXIwftWpuvHAUMfrNLno01tm7IEM7RHpBh3UcSP7b9fV8856mK49q641vI5BHpqY9l8tT 4S4SXkg/gXnGiYDL8vqcHJV55mdvn/dRC8j3IjOb6sTtnx1H4RlwEnXSsJ8nuKuN8DL54 tMCzQUEap8VcFVqfLXE34KyJZYAm4L0yqegUhaad9thOD3/2enxsU4ZvHlgsvmjScSQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AwkaxziH; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EEFA606A31C for ; Sat, 28 Nov 2026 15:08:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AwkaxziH Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9A041F000C1; Sat, 28 Nov 2026 15:08:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795878519; bh=KByFkq80/W8HwWeYva3/faNNZPdr67a+Zot4Kn/R/l0=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=AwkaxziHvIFMwMgYXTW79Qmv0W6HjWWINKVpoBxUa3d0FUd3P8RJZsV+Op0JKgq+J relQXv9qytgguV1y0N4rRR21A/WvcRdZe/yxTRUehE1Ixp+HkUcXC1wgB5UmKey7ll U8nacvPoGQpzzVSvgClSTSn9ebnMize4VN5bFiAlO8jzlwnMVcve9zHIGDr9X+FkgS mIlArksFhelFmrYWpKzmnMcVIlEC0MgqOj2Tcx2LrLTmjCzePkXfPREEsQVsBpDttM cxY0fE0MbCdoh/EJUSY7w9NbZqX57esg38zKf6TRpIKXt0wfhHSn55SVuYzl6GYOdW ZBYaGdr7GHTZQ== Subject: Re: [PATCH v6 net-next 06/15] selftests: xsk: split xskxceiver main() into setup, run and cleanup From: netdev-bot+sashiko@kernel.org To: maciej.fijalkowski@intel.com Cc: netdev@vger.kernel.org, magnus.karlsson@intel.com, stfomichev@gmail.com, kuba@kernel.org, pabeni@redhat.com, tushar.vyavahare@intel.com, kerneljasonxing@gmail.com, bjorn@kernel.org Date: Sat, 28 Nov 2026 15:08:38 +0000 Message-ID: <179587851820.3135.3520054893170043796@kernel.org> In-Reply-To: <20261127150527.1122049-7-maciej.fijalkowski@intel.com> References: <20261127150527.1122049-7-maciej.fijalkowski@intel.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] xskxceiver now exits with a different status on several setup failures, and the commit message does not say so. -- selftests: xsk: split xskxceiver main() into setup, run and cleanup This patch splits xskxceiver main() into bind_iface(), detect_mode_caps(), mode_supported() and cleanup_iface(). It also makes run_pkt_test() return its result, so that main() has a single exit path. ksft_print_header() is now called right after option parsing, and -l exits with 0 without a TAP header. > diff --git a/tools/testing/selftests/net/lib/xsk/xskxceiver.c b/tools/testing/selftests/net/lib/xsk/xskxceiver.c > index d82224a4fa4b0..97eece4c57f89 100644 > --- a/tools/testing/selftests/net/lib/xsk/xskxceiver.c > +++ b/tools/testing/selftests/net/lib/xsk/xskxceiver.c [ ... ] > @@ -185,17 +183,40 @@ static void print_usage(char **argv) > ksft_exit_xfail(); > } > > -static bool validate_interface(struct ifobject *ifobj) > +static void bind_iface(struct ifobject *ifobj, const char *ifname, thread_func_t func, > + char **argv) > { > - if (!strcmp(ifobj->ifname, "")) > - return false; > - return true; > + size_t len = ifname ? strlen(ifname) : 0; > + > + if (!len || len >= sizeof(ifobj->ifname)) > + print_usage(argv); > + > + memcpy(ifobj->ifname, ifname, len + 1); > + ifobj->ifindex = if_nametoindex(ifobj->ifname); > + if (!ifobj->ifindex) { > + ksft_print_msg("Error: cannot resolve interface %s\n", ifobj->ifname); > + ksft_exit_fail(); > + } > + > + if (init_iface(ifobj, func)) { > + ksft_print_msg("Error: cannot initialize interface %s\n", ifobj->ifname); > + ksft_exit_fail(); > + } > +} [Severity: Low] This isn't a bug, but should the commit message mention that the exit status changes here? Before this patch, two setup failures exited with KSFT_XFAIL (2): - an -i name that if_nametoindex() could not resolve went through exit_with_error(errno), which ends in ksft_exit_xfail() - an init_iface() failure printed "Error : can't initialize interfaces" and then called ksft_exit_xfail() bind_iface() now sends both through ksft_exit_fail(), which exits with 1. A failed pkt_stream_generate() in main() changes the same way. It used to call exit_with_error(ENOMEM), and now it does this: if (!test.tx_pkt_stream_default || !test.rx_pkt_stream_default) goto out; ... if (ret) ksft_exit_fail(); ret is still TEST_FAILURE at that point, so this path also exits with 1. The interface name handling changed too. The old parse_command_line() copied min(MAX_INTERFACE_NAME_CHARS, strlen(optarg)) bytes into the 16 byte ifname[]. A name of 16 or more characters was therefore left without a NUL terminator. bind_iface() now rejects such a name through print_usage(). The commit message calls this a split of main(): Prepare xskxceiver for one endpoint per process by splitting main(): The only exit status change it mentions is: -l prints no TAP header and exits with 0. At this commit, xsk_prereqs.sh test_status() prints [ FAIL ] for status 1 and nothing for status 2. Its summary counts any non-zero status as a failure, so the overall test_xsk.sh verdict stays the same. Those scripts are removed in the next patch, "selftests: xsk: run one test case per xskxceiver invocation". The new exit codes remain until the end of the series, and no later commit message mentions them. Could the commit message add a sentence about the new exit codes and the name length check? -- Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261127150527.1122049-1-maciej.fijalkowski%40intel.com