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 4B81D8017D for ; Tue, 22 Sep 2026 12:04:02 +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 68MC2j58018080; Tue, 22 Sep 2026 15:02:46 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68MC2j58018080 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="rfLReMxX" 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 68MC2cbf018051 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 22 Sep 2026 15:02:38 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68MC2cbf018051 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-482e8e1ac69so572095f8f.0 for ; Tue, 22 Sep 2026 05:02:38 -0700 (PDT) X-Gm-Message-State: AFuF++kobXHwPmCgvHJj7QvK3nHvhu/rVUKEcp5mZj8t1h6dX+MC0HPo 2KqlT73mZa48osWIIDGnh27qPruLG1xJe9mRahIplkQzpbU52/VS3n8M/0hARKtkilVcv2mw6wb CFbOYr3M1aidtsOGikcC/BkeO11ScaDN/PcwiCXG2CsV8ZCtGIf6R5g== X-Gm-Gg: AYBFou0fK2E/C71n5SqVdWSqWSGJfb6XyfhwSxAQpJkVxOxCgvhroU4chACfyVaiAqv fQRehKF3m9nx59ZZ88C2aTkX/AW8kzTjR8cH0mItgXYZ7mJelxRZN76aBeVwA/WWbbC2hS+UA0E t149cy+RPddLBpHULZ1u81YQpPCAh2pI/2U4AT1DmitExVwuFRDgzM/SrPK/dgH4XvbynBWSEmK ooAOLSQAwVWGLx4Q9BstatIV/q+lUmooRfkZIJIbrIO4UHfgF+7qjvOZfz8uKLJ4b7qiSLeIO0b wo21gAZdLyOb13i9cyReP1CPTmIK4gSLjjWY9ekD5A5S3I1LQAp5pEkU+5inSkE+QN+7d47eqUj kVn+fPI8NIuGVd2Kfmu79+Rfd X-Received: by 2002:a05:6000:2913:b0:484:3311:257a with SMTP id ffacd0b85a97d-48861006416mr4698755f8f.14.1790078558442; Tue, 22 Sep 2026 05:02:38 -0700 (PDT) X-Received: by 2002:a05:6000:2913:b0:484:3311:257a with SMTP id ffacd0b85a97d-48861006416mr4698683f8f.14.1790078557767; Tue, 22 Sep 2026 05:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1790078557; cv=none; d=google.com; s=arc-20260327; b=d8YValjBetCSAnBUryXObWO/XtpATai8eHJQxSvgs9FQ5O4qzmUHUm71mbC+rLiHmp PczdpiMpbge4GU2tOdB1L75wBWCnGauHFySTPYFNeTSGzIojafjCAEtxNvlRyEyIyVy2 67GjMMALUWaGZhO0mkm5Kg8KVMb7zxcpwJTHJHvkum2jWEyCF+QnQTYJ3/re+7MAVIXD sfHjH14rEpENgxCfGa+Ig2lsR3ccCwkaSot1F5i/R9ow6QQWmolngv73IW86MvWonD/F b+F+rb5r1L9EbtxsxQajLVORvnFHi/02/C0Og5/SulzH0dJ1Asn2CfzZVewW+B5s7o1h VS+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=BUnPjz72mJEOOgE1CwX6qxiHPR9IHQ13JYDN5MoAn+I=; fh=bRmlDJ6vflC8xapCpe8SIKiBemLWBr+xozKix8GBr/Q=; b=Izy6LJ+wNpxPguOrORop0Jb0w4N+S95XLfkEW/SjbfI/3oCcrJOrS8qc02FQWnjt/6 1D5yBjFwRhhwE41yHz06A5eXbaJhQcUqa7W/iK8VZ388G4MjaM1xUE8GU1PBqXm3Ui8C o78iADdndxR4QbeDVQBbhTD3r6Tmi11Jih7275VdEVtKXRY1sQ3dsUhIQuRMa2lE2YXZ BOdOG4a31qSvvRN0WOTipCpMDxi2uodeuZhOvD0E1wPgSxEbrhh8FHH4Rhj32BqJ3ld5 xm3gkncIVVKhyap8W+OxiG9n/4RjNwosOJjRdiR57c3cg3acEWFPW3WkAWN2uNzCGTLw 92Og==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=rfLReMxX; 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-488627c12casi2899768f8f.160.2026.09.22.05.02.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2026 05:02:37 -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=rfLReMxX; 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=rfLReMxXIUQT 3p26DvBwPGM6XhUOVqotUEJycWXDvjB/sho5uKPJwnMNurxsjpupIvaq+He23PtgVTC5lACLB+IgF nG6po8Kmm5C8X/1U1bzjkwmpmL0wPZc3g8F0DtLr6ue2HoP3BbA6ejFE5SdzEd1S1NqykBO0BUa3I bAn74XIEbo/Ly1OraE1iJBvjd5iMzTIWw6hBuF1rfD2Y0co9IXB4YhcuVwXTgA6JPBZU9wtv1BOxz wytvANhIAQumxDKuDhQ2ckL8YFpol3zstXX48ayxz8y352Rp4K5PLiawyqkihS/KPOmmzRdjgX36I 9sBhSy4hNvb0BgTcigUQsQ==; 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 1x8z9t-009l3P-2G; Tue, 22 Sep 2026 14:02:27 +0200 From: Eva Kurchatova To: vasileios.almpanis@virtuozzo.com Date: Tue, 22 Sep 2026 15:02:20 +0300 Message-ID: <20260922120235.2729869-1-eva.kurchatova@virtuozzo.com> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH vz10 v2 1/6] 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