From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id BF7A280299 for ; Tue, 22 Sep 2026 15:02:15 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68MF0qsu019480; Tue, 22 Sep 2026 18:00:54 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68MF0qsu019480 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="BcEDJdpd" Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68MF0pqT019458 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 22 Sep 2026 18:00:51 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68MF0pqT019458 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-486f18da958so724024f8f.0 for ; Tue, 22 Sep 2026 08:00:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBwctDYnO0073lvk5f0BFQ0pYH3zEgBTZRAU5RG4XrP4AEnN8BzqRYWtyevzlWe7QvrTcjAL7Q==@openvz.org X-Gm-Message-State: AFuF++n+0j+i61ROyew3ndHvWs04sDEoLFMPvJoiweI0qetgLGiB/rok sQb63Aq8r41Ptds77mDY/ptrpyCD0B2WmP6svmwmLv1g15idX3ALfp5wgafPdZJHRlPCBtDrbJu YwitPikgjch1EnhS5+NVttAoUYikduK/Wt2Fp+/hD20zOWLsiZZBR5A== X-Gm-Gg: AYBFou3+AMC/Hbkh8pVulQWnrHCC45QHSobJYzH2/ETECsq94wc6ASS0f6gEd2mefiB YEMPRGRGi0jToeNby+5g3eTe+p+O0ySb2bcWhkf+ZReSyj5r1cpAPQfi47C00BAxKhMpjtjkOmv q8ro8SF/hC2WGgJ+PUkH86koMgRbqhdry/zCLMJm/yQ/S/hn+0beUo/bGk2bpC2EiiYJi8Y1sVj yvFrgF3RFCVyXfcq78LNBcgMFMsIb+iiwoEGT4Xp9mtjgdcetbr2n+SxMaQONyB7x0VMVItbCkS XQrFh2DKvULo0kpoQWNu7ThLqAgFMm/npUVr/H2tDW6gf12xopIqMs4fpxdshNdNKKvdpKgcvnD vR/spTasTTlVvwCbziw== X-Received: by 2002:a05:6000:2f83:b0:485:8ea0:da8c with SMTP id ffacd0b85a97d-488610132e4mr5439845f8f.16.1790089251198; Tue, 22 Sep 2026 08:00:51 -0700 (PDT) X-Received: by 2002:a05:6000:2f83:b0:485:8ea0:da8c with SMTP id ffacd0b85a97d-488610132e4mr5439774f8f.16.1790089250489; Tue, 22 Sep 2026 08:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1790089250; cv=none; d=google.com; s=arc-20260327; b=GpkAFibyW9G3Tv3EAubL/EHhiycNzX3+gNiOSSUAxCYmmo9IBFGJ9rmtq2irRQBMpK btse0gCR/I3UL0HhG2QHh7Yhom4wpQ8+agqTuV2e1iejQXGc3iL9itTy/fqA2QTIzDiK RHtD3kVVLqcvontLIXh7/d48Jd7Jv74NGXtu/TMsBa+d9ZEBKvgi38pazZxHCWegtRl1 jx6Z7HGlF1I8BArgmPupyhdksIwY2rnAq+5nfmhHRDRd3AAV4CQEGM13BDVB/morLbFS T4WlTKQyg7dC0CGyAHozhDea7AVMSG7TKtMdsfAFc5UBTVv2IXkBicc12jc5OuUjOGY7 YnyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=ebKfeEXjLzXns0q1Kpn+7VwgMhv2UQPfaYp8vxt8uaM=; fh=RDs/3FkPwJ7DtDY3v0qOo3CaTMcY6h5syx0Vq9PC0Z0=; b=SUA0VGtM5ewTCX6i1GKOBsb0i0ZJFUXwZD6q4oCYmLIze6TrHW+KPsneWEWfwVPGJL W+94SwGvWEt1BLAej3P+W2/yPdMGz/rW4btbvK7ObIUfPzLOwlM4GM79kSdm4aeslWNb J3HGe+FrfjdbAxRciBOvrHP6VDFgDoK9BmCJ62Cah0Nh1ohzqJkATuzPD0WnuhMbboql KRlaYI7g55pPy0LEKAK7GGVBZzIsF6qVyOF9MwUo4S1FXNPHgy7RAUE9zD++4uZkw1x8 7+bhzLQ8aKy6f90nEDHDAf7/Adq3nKOgI3wCZ3isrGVOQ2ozX1WRPSLL+5NMdvUZrPnO xi2A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=BcEDJdpd; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-488627c3f98si3413631f8f.237.2026.09.22.08.00.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2026 08:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=BcEDJdpd; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Message-Id:Content-Type:MIME-Version:Subject:Date :From; bh=ebKfeEXjLzXns0q1Kpn+7VwgMhv2UQPfaYp8vxt8uaM=; b=BcEDJdpdQh8jAoXxvG8 QQM0KmYkGcZpaDb7FNoReFPGF/xMf2gY2vW8GVM6iTQY9swKreXykdoHulZzpyJC62O1SZxp6OjVR xTZihGAcVnJP8QyFxoP+4NHdbO0OBLZ1nPGv2T8mNCjYqln++U7qTMFfxIDcsZsQjz2Dlx/RY49hE rKDUZetA0Tql1kbwyINIsWbgECfIHHY/aofzhUfS1jz+W/lg/zGRGrq24YurWNlMHL8ZJdDfXsPco 28dPZR9kYouza0r+OJZpKl4Vm0WTUNHt9rfk/myezUxda7GYM6PYwSyZnQ2PM+2853k+a9SptTh// j1jRwljVsvMrZAQ==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=f0.sw.ru) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1x91wM-00DCaA-0e; Tue, 22 Sep 2026 17:00:39 +0200 From: Konstantin Khorenko Date: Tue, 22 Sep 2026 17:00:44 +0200 MIME-Version: 1.0 Message-Id: <20260922-b4-kh-self1-v3-1-4548b8d45755@virtuozzo.com> References: <20260922-b4-kh-self1-v3-0-4548b8d45755@virtuozzo.com> In-Reply-To: <20260922-b4-kh-self1-v3-0-4548b8d45755@virtuozzo.com> To: Eva Kurchatova X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4330; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=OqZ9IevQ7iXq+hjmBnOPQ9S2Gcj5cDY8+WcTa95369k=; b=owEBbQKS/ZANAwAKAVGWCkf5YVwqAcsmYgBqspgfS1VbDpqMP3VeQxwkEtMfg4Q5mmfdYQIHK 16QM7ybQFqJAjMEAAEKAB0WIQRWD23IPcXT0GO9CCxRlgpH+WFcKgUCarKYHwAKCRBRlgpH+WFc KoniD/wNlpFUOV7Qc3BIZ3IZwVVyI1YzarRzvwRhOEiU5HagDt73ak0bo9SUFCro+pgohfaZAmE SOsCSn38khirY87o7n9vMITAQYp7zaOwbKEo90kM/IIvX5xDrxMUqppC3kl51dobM0M+pBUpc0b nyj7pUZi7Gumj22en1bjpzcuPjjhkhq44wH+zvlbW6w4QD4jCC5Jzd/bCeHxTB5mk37SCm7DraM sRBtrvxe9SVvrI7uG37/yFZ0YIbZkrtwZOgJp13sUe68L7JFo0VGMX1opEk/XkY08ifGH2OPsJn G95T6uS7mAdd89bUWEDfqhM7/1ydnomfCbnpCZyAN9XaUAUnzylar0bAGYEfpg54/OaZpGUEWZ+ wi4/N4+q/9Ro2/uikxPzlNYmXU8rUJ886Zs9Z8/5QZ9hGT2s6UbbrlNT5Q0KUxd2nH+n40ryel8 4SyoGSux/mFvNqBmVaEeXRW66/06V7H+ou5A90UgxWfpp8EaE3zocUMTuA5wY2cnniAQUIETy0s PRHPFd8FYrt2skhX6iUXccJqLBe36ddOc5l2T0aFOh6GDJSAo2RXRDvXqF3JMTlQyxi9Jpt72QF jVNm/65BNjxq1NUP0wVwSquQGNsQM8cwsC3ETs1Il/UeTTTEgk9AOyMh/o6lGpnkeMmVxiGCrej UKYBz/Ui/3qgeLw== X-Developer-Key: i=khorenko@virtuozzo.com; a=openpgp; fpr=560F6DC83DC5D3D063BD082C51960A47F9615C2A X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v3 1/5] selftests: net: run the fdb and bind tests in their own netns X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Eva Kurchatova 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 Reviewed-by: Vladimir Riabchun --- tools/testing/selftests/net/bind_wildcard.c | 13 +++++++++++++ tools/testing/selftests/net/fdb_notify.sh | 7 +++++++ tools/testing/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 b7b54d646b937..5ebf21c97df1a 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 + +#include #include #include @@ -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 c159230c9b623..4f65f6720b1b8 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 2d442cdab11e1..7319bbcc4fbc2 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 -- 2.43.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel