From: no-reply@sashiko.virtuozzo.com
To: khorenko@virtuozzo.com, Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v2 1/1] selftests/bpf: run the xsk veth tests in a network namespace of their own
Date: Thu, 22 Oct 2026 02:53:06 +0000 [thread overview]
Message-ID: <010701a16186cd92-43999c2d-8841-4090-822a-f2042380e8be-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261022024816.2435565-2-eva.kurchatova@virtuozzo.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] selftests/bpf: test_xsk.sh netns skip path exits 1 via test_exit()
--
commit 8857ec024ef596f27390842fbc1312e800d12531
Author: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
selftests/bpf: run the xsk veth tests in a network namespace of their own
This patch makes test_xsk.sh create a network namespace and re-run itself
inside it, so the veth pair is isolated from the host's traffic. Because
the max_skb_frags sysctl isn't visible outside the initial namespace, it
also adds a -f option to xskxceiver and test_xsk.sh. The commit message
says the tests are skipped when network namespaces are unavailable.
> diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh
> --- a/tools/testing/selftests/bpf/test_xsk.sh
> +++ b/tools/testing/selftests/bpf/test_xsk.sh
[ ... ]
> @@ -162,8 +167,27 @@ if [ ! -z $ETH ]; then
> VETH1=${ETH}
> else
> validate_root_exec
> - validate_veth_support ${VETH0}
> validate_ip_utility
> + # The host configures and talks on any new interface in its namespace
> + if [ -z "$XSK_NETNS" ]; then
> + XSK_NETNS=xsk${VETH0_POSTFIX}
> + if ! ip netns add ${XSK_NETNS}; then
> + echo "skip all tests: cannot create a network namespace" >&2
> + test_exit $ksft_skip
> + fi
[Severity: Medium]
The commit message says "Without network namespaces the tests are
skipped", but can this path actually report a skip?
test_exit() is defined in xsk_prereqs.sh as:
test_exit()
{
if [ $1 -ne 0 ]; then
test_status $1 $(basename $0)
fi
exit 1
}
It prints "[ SKIPPED ]" but then does an unconditional "exit 1" and
ignores its argument. When "ip netns add" fails (no netns support, no
permission, read-only /run/netns, name collision), test_xsk.sh will
therefore exit with status 1, not $ksft_skip (4). The kselftest runner
will then count that as a failure.
Before this patch, a host without netns support would still run the tests
in its current namespace. Now such a host reports a failure.
The test_exit() behaviour wasn't introduced by this patch. It already
affects the existing veth-missing and ip-missing skip paths. This patch
adds a new call site that depends on it, though, and that site is more
likely to be hit.
Should test_exit() be changed to "exit $1", or should this path exit with
$ksft_skip directly, so the skip is reported as the commit message
describes?
> + trap "ip netns del ${XSK_NETNS}" EXIT
[ ... ]
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261022024816.2435565-1-eva.kurchatova@virtuozzo.com?part=1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-22 2:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 2:47 [Devel] [PATCH hci-8.1 v2 0/1] " Eva Kurchatova
2026-10-22 2:47 ` [Devel] [PATCH hci-8.1 v2 1/1] " Eva Kurchatova
2026-10-22 2:53 ` no-reply [this message]
2026-10-22 3:06 ` Eva Kurchatova (Virtuozzo)
2026-10-22 16:14 ` Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=010701a16186cd92-43999c2d-8841-4090-822a-f2042380e8be-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=eva.kurchatova@virtuozzo.com \
--cc=khorenko@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.