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 DE5CF802E4 for ; Mon, 31 Aug 2026 22:53:03 +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 67VMpoME031057; Tue, 1 Sep 2026 01:51:53 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 67VMpoME031057 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="uuaFX6uv" Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 67VMpfB5031028 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 1 Sep 2026 01:51:41 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 67VMpfB5031028 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-4843313047eso1359651f8f.1 for ; Mon, 31 Aug 2026 15:51:41 -0700 (PDT) X-Gm-Message-State: AFuF++mXBW7y5t3L1ismZGf0S9uzLECpxWCPxSEpUEV9kPECl1RO5jny y9OeGDReKHMvrnjXrf8Al0/MKmIBh8A5xHGSeNbSOG3YKLmHAcxZTF5FSkdDobILQjfO4Zb/EhR 2Sqysi5Ch70BhqEZ8YQT9qfPaXlvgD68F5awTwL6NF77N2abcorIY2A== X-Gm-Gg: AYBFou3tiqkHEfqEZ9I370hkPZXwjVMToDW9GeVcm567rg5xu4o/1SEIhSsSuMVrwKR LrbH0YTHQ/7uzKyrHqGH38vNpEpnzv02QpCSRoBZeuX1IuEzXv9te0OZrgBpkQaSbbgL47NHAwt 5wLjhE2xEUrYgFTgkuwUneFtwLntmsZw4rmBmbRck032N4JCXBiCGPlXtlYB+jVR6lYRKCvs7Hr htDgPgTxYuZR+3qfbRHoehcJ130g5+cZtYT4/z7Fj+PJl0PQyNxMrYJUb5xJcp+EkGf5NHDyFxl HaoW6ObjGRalp0Agq6EgnTo/DU4bSlkCy+taJMSfT+Yp428M85PBkNQaiI3iWABJoEsysldGMuq t2f14aevxLDN1RMZRx3keLuc85Q== X-Received: by 2002:a05:6000:468a:b0:484:3f25:426b with SMTP id ffacd0b85a97d-48440fce68dmr5919920f8f.6.1788216701000; Mon, 31 Aug 2026 15:51:41 -0700 (PDT) X-Received: by 2002:a05:6000:468a:b0:484:3f25:426b with SMTP id ffacd0b85a97d-48440fce68dmr5919874f8f.6.1788216700543; Mon, 31 Aug 2026 15:51:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788216700; cv=none; d=google.com; s=arc-20260327; b=M+W10FNItBq888LtLWjDbeklQoL++y5QkXdPVLuM9nkk7CnmHOGBjpej/cINY9G/Nf kp2dWApyGTU8JL1mv7rSgrB8cjsbd1/hcaMaI/xykeoTfFdE/hlJhYFr4GQILKhM8T9V tCyjoeSd1UdmsFQTdbzieWYMxAubCacu+C6Mes31pcczDADiFNqmM3wtdeYDmCpZDVgt 5GMEtKYBOsEwS0J4LjpLkPV9KXE/3JkvYNUJe5Z4uT4VYXg8urmwcH6zjR4IGXIehG54 TOakO4d5LXj+W7EzoQSaPen6nmX4aTbipZGIxtERYuSaLIzTmnszvJbxRdzz8VrGSN6R Ve8w== 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=TCZkucD+GACvL3vVH5+Y52H7qpam05VfAP1ijLMxmUE=; fh=WpT6aB7RBAGHZeWZzqAr71yzRFbPTYkPWKsRagLn48Q=; b=Fx50XxTOvV1iDlXo5RPIt1qcMUPoSk93dMcGtPH0lFlB/EdwiXL0fMGdTuzAQnFJyT crOGAe6GWQ3s5h8ZNsQzjunGl00ZCVoAfOrLEi0G99zbYY63D2c7PM9JV7UAY8BQDYt/ 2wxT9eXgqLntGdiZkr1hX7YJ3nfcszv2gAGk3ynNQR7gJJphdNtp7ea4c4jBWqhMOAnT k5LWhwmjjZRGTr+V0O4bSVotuKCewdDCAT/Gv0x+g6duB7eoEDJc6A7FoS4MCWXujfGu 0FERF+pnFezROTy396aapevSxaJPj3VErta1dfgOEPQSv00vE4TOTGJ4sdEeF/CxKEtN My2Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=uuaFX6uv; 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-48442d86708si723926f8f.379.2026.08.31.15.51.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2026 15:51:40 -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=uuaFX6uv; 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=TCZkucD+GACvL3vVH5+Y52H7qpam05VfAP1ijLMxmUE=; b=uuaFX6uvMfpr 7kxkhqD9Iz6LhcaYSuddxTm4eb0vZSI6EA08W8pEbn7ECFMsTIP2eLAJoehCobDYPHMGbFbyKOI2E OmR1tSDLA8/MQdiElox/4u9vGKRDypLXuHYbtZV8Ypn97epaPkxfWgQtMaohbZ79hZnDSJhjXAXnG tuYPAtuqdJl9Vv1NclRMd5leeGBWdBZZIcbHkWF8rw4uw+f5Z8o1YTMmw3muZ3lTFxRB8YL3yz6tm DJyq3wdnwt7cBWaYYtOXvKlbRSh1pdxKXZJABiLW5Svsa+Nox3GDnmAfffeJPJHCpT/g1zDKwFFkd EFZa6z1/0NtT65XUXB02Ig==; 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 1x1AoT-009n0b-1g; Tue, 01 Sep 2026 00:51:31 +0200 From: Eva Kurchatova To: khorenko@virtuozzo.com Date: Tue, 1 Sep 2026 01:50:54 +0300 Message-ID: <20260831225137.1642608-4-eva.kurchatova@virtuozzo.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260831225137.1642608-1-eva.kurchatova@virtuozzo.com> References: <20260831225137.1642608-1-eva.kurchatova@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH vz10 4/4] selftests: drv-net-hw: skip the tests that need a real interface 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 ethtool, ethtool_extended_state, hw_stats_l3 and hw_stats_l3_gre need a device that can set link speed and autonegotiation, report an extended link state, or offload L3 statistics. Where none is configured, lib.sh creates a veth pair instead, which supports none of that, so every case fails on something the kernel correctly refuses. Upstream answers this by keeping such tests in drivers/net/hw and not running them on veth at all: commit 0c499a351777 ("selftests: forwarding: Ditch skip_on_veth()") removed the equivalent check once the directory was split out. This guard is therefore not for upstream, it only stops a run that substitutes veth pairs from reporting failures. Skip before sourcing lib.sh, because lib.sh makes the veth pair as it is sourced. Exiting afterwards leaves the devices behind - vrf_cleanup() removes them and a test that skips never gets there - and a later test that adds a veth by one of those names then cannot. hw_stats_l3_gre asks for six interfaces, so one run left veth0 to veth5 in the initial namespace and the netfilter suite failed on it. https://virtuozzo.atlassian.net/browse/VSTOR-139651 Feature: fix vz selftests Signed-off-by: Eva Kurchatova --- .../testing/selftests/drivers/net/hw/ethtool.sh | 16 ++++++++++++++++ .../drivers/net/hw/ethtool_extended_state.sh | 16 ++++++++++++++++ .../selftests/drivers/net/hw/hw_stats_l3.sh | 16 ++++++++++++++++ .../selftests/drivers/net/hw/hw_stats_l3_gre.sh | 16 ++++++++++++++++ 4 files changed, 64 insertions(+) diff --git a/tools/testing/selftests/drivers/net/hw/ethtool.sh b/tools/testing/selftests/drivers/net/hw/ethtool.sh index fa6953de6b6d..b1744758627c 100755 --- a/tools/testing/selftests/drivers/net/hw/ethtool.sh +++ b/tools/testing/selftests/drivers/net/hw/ethtool.sh @@ -11,6 +11,22 @@ ALL_TESTS=" " NUM_NETIFS=2 lib_dir=$(dirname "$0") + +# The test needs a device capable of setting link speed and +# autonegotiation. Where no real interfaces are configured, lib.sh makes +# a veth pair instead, which cannot, and every case then fails on +# something the kernel correctly refuses. Check this before sourcing +# lib.sh: it creates that pair as it is sourced, so exiting afterwards +# leaves the devices behind, and the next test that wants one of those +# names cannot create it. + +: "${NETIF_CREATE:=yes}" +: "${NETIF_TYPE:=veth}" +if [[ "$NETIF_CREATE" = yes && "$NETIF_TYPE" = veth ]]; then + echo "SKIP: needs a real interface, set NETIFS in forwarding.config" + exit 4 # ksft_skip, lib.sh is not sourced yet +fi + source "$lib_dir"/../../../net/forwarding/lib.sh source ethtool_lib.sh diff --git a/tools/testing/selftests/drivers/net/hw/ethtool_extended_state.sh b/tools/testing/selftests/drivers/net/hw/ethtool_extended_state.sh index a7584448416e..c6c96117b1f1 100755 --- a/tools/testing/selftests/drivers/net/hw/ethtool_extended_state.sh +++ b/tools/testing/selftests/drivers/net/hw/ethtool_extended_state.sh @@ -9,6 +9,22 @@ ALL_TESTS=" NUM_NETIFS=2 lib_dir=$(dirname "$0") + +# The test needs a device capable of reporting an extended link state. +# Where no real interfaces are configured, lib.sh makes a veth pair +# instead, which cannot, and every case then fails on something the +# kernel correctly refuses. Check this before sourcing lib.sh: it +# creates that pair as it is sourced, so exiting afterwards leaves the +# devices behind, and the next test that wants one of those names cannot +# create it. + +: "${NETIF_CREATE:=yes}" +: "${NETIF_TYPE:=veth}" +if [[ "$NETIF_CREATE" = yes && "$NETIF_TYPE" = veth ]]; then + echo "SKIP: needs a real interface, set NETIFS in forwarding.config" + exit 4 # ksft_skip, lib.sh is not sourced yet +fi + source "$lib_dir"/../../../net/forwarding/lib.sh source ethtool_lib.sh diff --git a/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh b/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh index 67fafefc80be..1776a4954601 100755 --- a/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh +++ b/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh @@ -49,6 +49,22 @@ ALL_TESTS=" " NUM_NETIFS=4 lib_dir=$(dirname "$0") + +# The test needs a device capable of offloading L3 statistics. Where no +# real interfaces are configured, lib.sh makes a veth pair instead, +# which cannot, and every case then fails on something the kernel +# correctly refuses. Check this before sourcing lib.sh: it creates that +# pair as it is sourced, so exiting afterwards leaves the devices +# behind, and the next test that wants one of those names cannot create +# it. + +: "${NETIF_CREATE:=yes}" +: "${NETIF_TYPE:=veth}" +if [[ "$NETIF_CREATE" = yes && "$NETIF_TYPE" = veth ]]; then + echo "SKIP: needs a real interface, set NETIFS in forwarding.config" + exit 4 # ksft_skip, lib.sh is not sourced yet +fi + source "$lib_dir"/../../../net/forwarding/lib.sh source "$lib_dir"/../../../net/forwarding/tc_common.sh diff --git a/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh b/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh index a94d92e1abce..2cbc2682f7b7 100755 --- a/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh +++ b/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh @@ -13,6 +13,22 @@ ALL_TESTS=" " NUM_NETIFS=6 lib_dir=$(dirname "$0") + +# The test needs a device capable of offloading L3 statistics. Where no +# real interfaces are configured, lib.sh makes a veth pair instead, +# which cannot, and every case then fails on something the kernel +# correctly refuses. Check this before sourcing lib.sh: it creates that +# pair as it is sourced, so exiting afterwards leaves the devices +# behind, and the next test that wants one of those names cannot create +# it. + +: "${NETIF_CREATE:=yes}" +: "${NETIF_TYPE:=veth}" +if [[ "$NETIF_CREATE" = yes && "$NETIF_TYPE" = veth ]]; then + echo "SKIP: needs a real interface, set NETIFS in forwarding.config" + exit 4 # ksft_skip, lib.sh is not sourced yet +fi + source "$lib_dir"/../../../net/forwarding/lib.sh source "$lib_dir"/../../../net/forwarding/ipip_lib.sh source "$lib_dir"/../../../net/forwarding/tc_common.sh -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel