From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH vz10 v2 2/5] selftests: bpf: run test_xdp_features in its own netns
Date: Thu, 24 Sep 2026 14:24:41 +0200 [thread overview]
Message-ID: <c4a76acc-b2a5-4e00-9c1f-a03f03e4bf60@virtuozzo.com> (raw)
In-Reply-To: <20260831234217.1649428-2-eva.kurchatova@virtuozzo.com>
Committed to branch-rh10-6.12.0-211.52.1.22.x.vz10-ovz, will be released in rh10-6.12.0-211.52.1.22.3.vz10
2b7d45077716
selftests: bpf: run test_xdp_features in its own netns
The device under test listens on the veth address of the namespace the
script runs in and the tester connects to it, so a firewall on the
machine refuses the control connection:
Failed connecting to the Device Under Test control socket
That side of the pair is also always called v1, and cleanup is trapped
for signals only, not for a normal exit, so a failed run leaves the
device behind and every later run stops in setup with nothing printed
at all.
Run the test in a namespace of its own, the way nft_audit.sh and
nft_concat_range.sh already do: no rule of the machine applies, and
what the test leaves behind goes away with the namespace.
https://virtuozzo.atlassian.net/browse/VSTOR-139677
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Link: http://lore.virtuozzo.com/20260831234217.1649428-2-eva.kurchatova@virtuozzo.com
--
Best regards,
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
On 9/1/26 01:41, Eva Kurchatova wrote:
> The device under test listens on the veth address of the namespace the
> script runs in and the tester connects to it, so a firewall on the
> machine refuses the control connection:
>
> Failed connecting to the Device Under Test control socket
>
> That side of the pair is also always called v1, and cleanup is trapped
> for signals only, not for a normal exit, so a failed run leaves the
> device behind and every later run stops in setup with nothing printed
> at all.
>
> Run the test in a namespace of its own, the way nft_audit.sh and
> nft_concat_range.sh already do: no rule of the machine applies, and
> what the test leaves behind goes away with the namespace.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-139677
> Feature: fix selftests
> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
> ---
> tools/testing/selftests/bpf/test_xdp_features.sh | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/test_xdp_features.sh b/tools/testing/selftests/bpf/test_xdp_features.sh
> index 0aa71c4455c0..75acacee701d 100755
> --- a/tools/testing/selftests/bpf/test_xdp_features.sh
> +++ b/tools/testing/selftests/bpf/test_xdp_features.sh
> @@ -1,6 +1,14 @@
> #!/bin/bash
> # SPDX-License-Identifier: GPL-2.0
>
> +# The device under test listens on the veth address of the namespace
> +# this script runs in, so a firewall on the machine can refuse the
> +# control connection, and cleanup is trapped for signals only, so a
> +# failed run leaves the device behind and stops every later one. Run
> +# in a fresh network namespace, like the netfilter tests do.
> +[ "${1}" != "run" ] && { unshare -n "${0}" run; exit $?; }
> +ip link set lo up
> +
> readonly NS="ns1-$(mktemp -u XXXXXX)"
> readonly V0_IP4=10.10.0.11
> readonly V1_IP4=10.10.0.1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-09-24 12:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 23:41 [Devel] [PATCH vz10 v2 1/5] ms/selftests/bpf: Use local type for bpf_fou_encap in test_tunnel_kern Eva Kurchatova
2026-08-31 23:41 ` [Devel] [PATCH vz10 v2 2/5] selftests: bpf: run test_xdp_features in its own netns Eva Kurchatova
2026-09-24 12:24 ` Konstantin Khorenko [this message]
2026-08-31 23:41 ` [Devel] [PATCH vz10 v2 3/5] selftests: bpf: size the map in test_lru_sanity3 to whole refills Eva Kurchatova
2026-09-24 12:11 ` Konstantin Khorenko
2026-09-24 12:23 ` Konstantin Khorenko
2026-08-31 23:41 ` [Devel] [PATCH vz10 v2 4/5] selftests: bpf: run test_sock and test_tunnel in their own netns Eva Kurchatova
2026-09-24 12:24 ` Konstantin Khorenko
2026-08-31 23:41 ` [Devel] [PATCH vz10 v2 5/5] selftests: bpf: use the bpftool built with the tests in test_bpftool_map Eva Kurchatova
2026-09-24 12:25 ` Konstantin Khorenko
2026-09-24 12:24 ` [Devel] [PATCH vz10 v2 1/5] ms/selftests/bpf: Use local type for bpf_fou_encap in test_tunnel_kern 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=c4a76acc-b2a5-4e00-9c1f-a03f03e4bf60@virtuozzo.com \
--to=khorenko@virtuozzo.com \
--cc=devel@openvz.org \
--cc=eva.kurchatova@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox