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 B655680266 for ; Mon, 31 Aug 2026 22:50:07 +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 67VMmtnv030918; Tue, 1 Sep 2026 01:48:56 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 67VMmtnv030918 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="bCpOxySd" Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 67VMmrvS030892 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 1 Sep 2026 01:48:53 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 67VMmrvS030892 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-49b7c1dc61eso27551675e9.3 for ; Mon, 31 Aug 2026 15:48:53 -0700 (PDT) X-Gm-Message-State: AFuF++mCTobBCWmQOV3GmruwARsbHfnoB9+/BOfBJs86+3oRUD3FwYv/ o3bJkx50RuwcNP5cstEczrm9Fo8SaReOTMu0VblTXpVQfatCCl2et4P/MPFh6VbkbTfo3q3JdPD gVORfYDDFBb8kuCKnDYqRE+3sI0I2wwd1L68pLiHq9fg5/5bb5ee5xA== X-Gm-Gg: AR+sD11/+i21qopkcv+pGPUyyDMROrhS9geskFHcGjVUo6PF5M+ei/UjlhZVlvguX0T dEYdpBrDThmyAcaDpYA/y68aGu+OgGPtA7H+9Ln3AmN2ejcql9UXvzgBHhFJ0uv4qp9hHYz5VqL YWtOawrNsrJ424Nlh81rRtDIy/hezZeWBcd1BHho2ffw1VvejE3Go4QkltqK8PwotB8HKX1IZXt L4GsSBXp3oTQuh5qVStytyEvUv4io8fkx03XRRgQazgyJLw1D7UOlxY/kWqCOfkgDCe/9CTtdxL a3Iyg/ILZdp2IEAlSvRH7zCxMxbb5s0fwmJzqpdd+QBWABZR7X0dEs64MqJ4xsMYGs//MIqGrob UGglZaSTKyVW1+4e1MrqE6ggopg== X-Received: by 2002:a05:600c:8b35:b0:496:bffb:fb7b with SMTP id 5b1f17b1804b1-49cdc435eafmr55604245e9.10.1788216533344; Mon, 31 Aug 2026 15:48:53 -0700 (PDT) X-Received: by 2002:a05:600c:8b35:b0:496:bffb:fb7b with SMTP id 5b1f17b1804b1-49cdc435eafmr55603985e9.10.1788216532926; Mon, 31 Aug 2026 15:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788216532; cv=none; d=google.com; s=arc-20260327; b=ToC2n15IVVLpbb/+nQ5NohldfL5axCOiZ90Pvq/ZYaKmgG9aO1GRTKMIu//nXhRVui M4WorMbZV7SGNTlGjklu7iHRIVGiwj5yQ/XnIpIjLtH49Ult0SAglIW740Ulr+O6cwV2 6VJZnyXMcgPXo3QqBlPylixDP/nWbyzWcAy6yDmNS8Zj0iVWwQhEkOj9gJJxdmbiPHKP zeUWxfFjoNqu3tc3Gkxiubrmyl6zdt0KetmIg8Nfr5GjLmnhweXpHrKQ/kdMCQ2fUBtM hs7KFHSe54hIEV7lOXwz2aPRjDUuBslLa6EgoDZQ5DjIsZjueIqTVK5jXycpZbUW0TtU DFLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=BUnPjz72mJEOOgE1CwX6qxiHPR9IHQ13JYDN5MoAn+I=; fh=WpT6aB7RBAGHZeWZzqAr71yzRFbPTYkPWKsRagLn48Q=; b=hLXGWTb2TdvRnnYvdTgYhs/Q8CyD1WUrSiGklg3iwUAYcI+cYznWWJh4dZw1x46Slt z+jtVXoE9g7XLtjbDSfrnUNX8pTrVDYq0kWD58SiSK6y6emvoxkQEoixD7mUEBAGfIM/ 6vIUOtBDlityHnKnhLJwnf/6B72WqGD7fZJwvypDMDn/BVHRDw6y3hwXo5cO/dLqulz3 MsSpQQO2HNXzlmrQhPlul5ffykyKM3gXbudy0dfHBofoBix024lwZmG7pnGWNxF7kMYC L67phTHspTkVnlPOsz8blIaqlr247E5TZAAHKVptLFhJqFd5xdNufX9ly/EN3dL+dn2R hs1A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=bCpOxySd; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@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-48442d3833bsi727460f8f.7.2026.08.31.15.48.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2026 15:48:52 -0700 (PDT) Received-SPF: pass (google.com: domain of eva.kurchatova@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=bCpOxySd; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@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=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=BUnPjz72mJEOOgE1CwX6qxiHPR9IHQ13JYDN5MoAn+I=; b=bCpOxySdRsdk SsN9L6RBYPA/xLlQZ0cp+jBBZt8ReEqyfENJbZwr15HDPyIyYRw/3GI20Ng8nRTQHMRLAijyvdsok Z9HnfM1qYrZvUOWjIzD0xUAyMKb/s/DuD0u9GivXDPLCCwAy5+vGuHQVuny0shcM1cE0g6XrblZxa 80xtiWl2YxLYSNSHH1j+IY7EnhbpxblHcUin3P70inL6sDYpIjkLUk+UvAVxBuMjm5m92A+Pras1W SM95QzMDb77RaXhjafwaQVj5LBnskCaLb3+uWTG4+2BfSLr99Wu60caEfn/R3DtpJzo9HX8wNh7Gl XfSswuWb2e5k7icu/l6sLA==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=LekKit-T14) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1x1All-009jQI-2t; Tue, 01 Sep 2026 00:48:43 +0200 From: Eva Kurchatova To: khorenko@virtuozzo.com Date: Tue, 1 Sep 2026 01:48:20 +0300 Message-ID: <20260831224850.1642265-2-eva.kurchatova@virtuozzo.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260831224850.1642265-1-eva.kurchatova@virtuozzo.com> References: <20260831224850.1642265-1-eva.kurchatova@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH vz10 2/7] 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 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 --- 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 + +#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 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 -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel