From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>,
vasileios.almpanis@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH vz10 v2 1/6] selftests: net: run the fdb and bind tests in their own netns
Date: Tue, 22 Sep 2026 16:35:08 +0200 [thread overview]
Message-ID: <3318c2e4-6f7d-44fc-8c2a-0d15631f7cfc@virtuozzo.com> (raw)
In-Reply-To: <20260922120235.2729869-1-eva.kurchatova@virtuozzo.com>
Eva, you have sent a v2 of the patchset.
Where is the changelog between v1 and v2?
What has changed in between?
--
Best regards,
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
On 9/22/26 14:02, Eva Kurchatova wrote:
> Three tests share the initial namespace with the machine and fail on
> what is already in it.
>
> fdb_notify and test_vxlan_fdb_changelink bring up a vxlan device on the
> default port 4789. Where the machine already has one there, and that
> one is metadata based, as the device open vswitch keeps is, the port
> cannot be shared and the test device is never created:
>
> # ip link add vxs type vxlan external dstport 4789
> # ip link add name vx up type vxlan id 2000 dstport 4789
> RTNETLINK answers: Address already in use
> # ./test_vxlan_fdb_changelink.sh
> Cannot find device "vx"
> expected two remotes after link set [FAIL]
>
> Run both in a fresh namespace by re-executing them there, the way
> nft_audit.sh, nft_concat_range.sh and br_netfilter_queue.sh already do.
>
> bind_wildcard binds 0.0.0.0 and expects to know which sockets exist.
> With 432 foreign sockets on 0.0.0.0 on the machine it failed 6 runs out
> of 10; unsharing a namespace in FIXTURE_SETUP took that to 0 out of 10.
> This is what commit a897e194c475 ("selftests: net: run reuseport in an
> isolated netns") does for the reuseport tests.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-139651
> Feature: fix selftests
> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
> ---
> tools/testing/selftests/net/bind_wildcard.c | 13 +++++++++++++
> tools/testing/selftests/net/fdb_notify.sh | 7 +++++++
> .../selftests/net/test_vxlan_fdb_changelink.sh | 7 +++++++
> 3 files changed, 27 insertions(+)
>
> diff --git a/tools/testing/selftests/net/bind_wildcard.c b/tools/testing/selftests/net/bind_wildcard.c
> index b7b54d646b93..5ebf21c97df1 100644
> --- a/tools/testing/selftests/net/bind_wildcard.c
> +++ b/tools/testing/selftests/net/bind_wildcard.c
> @@ -1,6 +1,10 @@
> // SPDX-License-Identifier: GPL-2.0
> /* Copyright Amazon.com Inc. or its affiliates. */
>
> +#define _GNU_SOURCE
> +#include <sched.h>
> +
> +#include <stdlib.h>
> #include <sys/socket.h>
> #include <netinet/in.h>
>
> @@ -716,6 +720,15 @@ static void setup_addr(FIXTURE_DATA(bind_wildcard) *self, int i,
>
> FIXTURE_SETUP(bind_wildcard)
> {
> + /* The port is picked by the kernel and the test then expects every
> + * conflict on it to be one it caused itself. A socket the rest of
> + * the system holds on that port breaks that: a v6only bind to ::
> + * is given a port whose 0.0.0.0 counterpart is taken, and the
> + * binds that follow fail with EADDRINUSE the test does not expect.
> + */
> + ASSERT_EQ(unshare(CLONE_NEWNET), 0);
> + ASSERT_EQ(system("ip link set lo up"), 0);
> +
> setup_addr(self, 0, variant->family[0], variant->addr[0]);
> setup_addr(self, 1, variant->family[1], variant->addr[1]);
>
> diff --git a/tools/testing/selftests/net/fdb_notify.sh b/tools/testing/selftests/net/fdb_notify.sh
> index c159230c9b62..4f65f6720b1b 100755
> --- a/tools/testing/selftests/net/fdb_notify.sh
> +++ b/tools/testing/selftests/net/fdb_notify.sh
> @@ -1,6 +1,13 @@
> #!/bin/bash
> # SPDX-License-Identifier: GPL-2.0
>
> +# The test brings up a vxlan device on the default port, which fails where
> +# the host already has one, as a metadata-based device holding that port is
> +# not compatible with the one the test asks for:
> +# RTNETLINK answers: Address already in use
> +# Run in a fresh network namespace, like the netfilter tests do.
> +[ "${1}" != "run" ] && { unshare -n "${0}" run; exit $?; }
> +
> source lib.sh
>
> ALL_TESTS="
> diff --git a/tools/testing/selftests/net/test_vxlan_fdb_changelink.sh b/tools/testing/selftests/net/test_vxlan_fdb_changelink.sh
> index 2d442cdab11e..7319bbcc4fbc 100755
> --- a/tools/testing/selftests/net/test_vxlan_fdb_changelink.sh
> +++ b/tools/testing/selftests/net/test_vxlan_fdb_changelink.sh
> @@ -3,6 +3,13 @@
>
> # Check FDB default-remote handling across "ip link set".
>
> +# The test brings up a vxlan device on the default port, which fails where
> +# the host already has one, as a metadata-based device holding that port is
> +# not compatible with the one the test asks for:
> +# RTNETLINK answers: Address already in use
> +# Run in a fresh network namespace, like the netfilter tests do.
> +[ "${1}" != "run" ] && { unshare -n "${0}" run; exit $?; }
> +
> check_remotes()
> {
> local what=$1; shift
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
prev parent reply other threads:[~2026-09-22 14:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 12:02 Eva Kurchatova
2026-09-22 12:02 ` [Devel] [PATCH vz10 v2 2/6] selftests: net: skip what this kernel and iproute2 do not have Eva Kurchatova
2026-09-22 12:02 ` [Devel] [PATCH vz10 v2 3/6] selftests: net: make the veth GRO checks independent of host tunnels Eva Kurchatova
2026-09-22 14:51 ` Konstantin Khorenko
2026-09-22 12:02 ` [Devel] [PATCH vz10 v2 4/6] selftests: net: install pmtu.sh, the script pmtu_wrapper.sh runs Eva Kurchatova
2026-09-22 12:02 ` [Devel] [PATCH vz10 v2 5/6] selftests: net: mark test_ingress_egress_chaining.sh executable Eva Kurchatova
2026-09-22 12:02 ` [Devel] [PATCH vz10 v2 6/6] selftests: net: let the bridged PMTU tests take the ICMP they ask for Eva Kurchatova
2026-09-22 14:27 ` Konstantin Khorenko
2026-09-22 14:35 ` Konstantin Khorenko [this message]
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=3318c2e4-6f7d-44fc-8c2a-0d15631f7cfc@virtuozzo.com \
--to=khorenko@virtuozzo.com \
--cc=devel@openvz.org \
--cc=eva.kurchatova@virtuozzo.com \
--cc=vasileios.almpanis@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