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 C30FF802A5 for ; Wed, 30 Sep 2026 14:11:26 +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 68UEA6wF021105; Wed, 30 Sep 2026 17:10:07 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68UEA6wF021105 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="TwVNAfvH" 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 68UEA5ig021101 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 30 Sep 2026 17:10:05 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68UEA5ig021101 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-49e7631c43aso51890765e9.3 for ; Wed, 30 Sep 2026 07:10:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBwuB/XscjipihzK2+5mUnpBiDPXbPG76PFt9iUSih9Iz2M4mdMd7bOajWXOyEU7kxjaSqu65w==@openvz.org X-Gm-Message-State: AFuF++lhSMfPfbsASgX0I+JPHYj5VE8osTuIEt3qf6MXRubjmbmxtsfb OMvPys9QQuOXYqdLw9Yi3PuQDFLFYWTEOSEKG5mLwwkZSOP44eheuc6yIclnDWnCP7VYQlB4AXD 0ieSx4M32xzrh8Bd0cSRG/4rHNNlcseS0nRMt6VkJ9uUqgcKmT3pmxQ== X-Gm-Gg: AYBFou0MKBGx9/AG6rz+nPxcltZ00vp7IgcGRSLJxH2tZPfEnUDr0H+yDwOpvsrxTuw LX4jweWq3QUKhLB3gNFRDXWsTZ31cyYteArsUsAetgM3sU4xfkC/Ne9VTcG49sHhFmd2xekh9GJ VJNpx94U2sCnJ7G6L5MWD0/kzPi5nqB0MLTrJbJLVr42p79fVmbWP2lMAKWrW5q/tZjMyTPDXgE kFtlB9R+cAr0hVjJeHlG6TmPxrualITA13UsA2TmY/TXzpAk3ECChdZ35wg5rl4r+YFahyekUro Q38IzHvvSFIpPoZBJr54DKy8JK8JWPQSk5ndLon8LdUccNX7hzEKH6XatxPTp91xNRfme8NPFj0 LVe2YNwk3pD7ToDkf+A== X-Received: by 2002:a05:600c:a45:b0:4a0:174:579e with SMTP id 5b1f17b1804b1-4a01b129a60mr24865695e9.28.1790777404945; Wed, 30 Sep 2026 07:10:04 -0700 (PDT) X-Received: by 2002:a05:600c:a45:b0:4a0:174:579e with SMTP id 5b1f17b1804b1-4a01b129a60mr24865095e9.28.1790777404242; Wed, 30 Sep 2026 07:10:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1790777404; cv=none; d=google.com; s=arc-20260327; b=hpTneuwtyXXJuxH8JQqrd/X9pnHMVVnpmch0DD1i4Ag9coyQ4eyBu1x6ZQlm9f9cG4 lkhdSam/ojtqY5gqtmqGzKpwt7mgNMfwHJpQBwkcOgm9ODY9mME9lERp23Od2tmgCy1t EHI2IzUTIPEKSMXIszPuyS55SS/hLXHhnj7MQXIGt+wGEBpM7jpUmx6wc8kI4Rrgpat4 GFE0jmJtfwWtZfluOVHV6eTdOm6hXHHVcDZgFhP2oL7eKC3J+jk90BpDex74pqp3Ojux gASk9jg/MqJRwTDh4wAAkFb0hbhe0KdqxBDacWp/TREi+0FCCUkfGNZlFG6IwhnRddRw RIdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:mime-version:dkim-signature; bh=kXUy9aw4cuZlXHpp9GaNF2MFT1u5CU1D0cx/Emo3Qpk=; fh=CTF2GHyV+XdzB5TROrdG4fdLri6JSHNOBC+LNuNq5bA=; b=aZLhyTDkl3acz3vfqkWeNVZkNGFQ1T/i1Kfu4PrcUNgNxcnk7YfOknrw38DQNkURt4 uifTTlQ32YhskSeBfA0Om+TNbMtxG/l5UZDQ2HPLn0HPVfI+2ouFWRq66hv59H6MITKr PQypWBRZ7ewlAqNvW1oRqKm/+djTN7eoymF0bdgEe8oEUK0/Bn74vKtyX2LLTfvmAqF6 deWj2QRYhexTAWagJ5voDc1eWx7HuFCjq2Ex1VGklDGPeHwsjkQhbiSUYiyG1BRWI7O+ tJ0Tg6udsEcaj/84Zfnb4zTPj6MMOFWOPS6CgTJaji+rEDP7aw+/10RV8h97qGQHSHDV Hv3g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=TwVNAfvH; 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-48b029dce91si3603704f8f.223.2026.09.30.07.10.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2026 07:10:04 -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=TwVNAfvH; 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:Date:From:Subject:Content-Type: MIME-Version; bh=kXUy9aw4cuZlXHpp9GaNF2MFT1u5CU1D0cx/Emo3Qpk=; b=TwVNAfvHhvdl RdqpJC6l26SwQl0YZaGAQI+Oo1cMEuuJ4N3qJ2aho9Bgop7CtqzuaRL7gTqggO6fT+Ot5cp4kW9LB sihigGubzSFs/O2zHyEzwaQ9iDbCDmgPV2a8bjQ0K8UPu4RE5ShEZFCYK8JRw8rJka44V8jxnnkkV Ubr6MXhdqGRWdbt6hSGRX5VoqD4nSzz1LhNYNMRUJsw61botoBuoAeTnu3gyred1pH2yFnJv+ljBY Lc9YQqaK8c64g1NpeKGveji1W/zDtJSFHilBz7qjSbb4DEQF6S/F783evcUIlNufP/N3tEvZO2soW Bhts0Ksvc3yTsqCNEA6baQ==; 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 1xBuxQ-005xOM-07; Wed, 30 Sep 2026 16:10:03 +0200 MIME-Version: 1.0 From: Konstantin Khorenko To: Eva Kurchatova In-Reply-To: <20260928194332.551992-2-eva.kurchatova@virtuozzo.com> References: <20260928194332.551992-1-eva.kurchatova@virtuozzo.com> <20260928194332.551992-2-eva.kurchatova@virtuozzo.com> Date: Wed, 30 Sep 2026 16:10:01 +0200 Message-Id: <179077740106.3600037.15843132411348304934.b4-review@b4> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6357; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=9IfeaJ+PLdBlhSs2m7IpZ9P4iQxf/HiYb3WeKTKfhV4=; b=kA0DAAoBUZYKR/lhXCoByyZiAGq9GDuguIbQaYU1QlMAQ7yqnNQl0eNItC4Cyehejq2gTkbe/ 4kCMwQAAQoAHRYhBFYPbcg9xdPQY70ILFGWCkf5YVwqBQJqvRg7AAoJEFGWCkf5YVwqTlMP/jwl DloHGpTJqUiD30Z8ood5CE5kHhIlRuYLWKwBosa4jy1dJ+ycgYqyNOsjU1I7QHe+qokPkX0JyjJ /tD33+IEGB5eUDo1aAkLynFFv0w5T4UZ+vHub0YGhKS6SD5q0p8lvydLivvJ9X/cgYla8XcwG/U 1RStOOdcxaKf7jbQQfxh7I8ztRr9Q42TzNnCOmIHWnBduR0D7JpKiYTNxyLJ6Wkgk4XJDqK80/o /cp7gP+u6CX21OBKSV/GxRu873ZqqEQFbiu5fyW2fr+dB26rFVifvQcRu4vvkloU/+jx2zlDwlr 2Hj/K8T9Y/TSYHOFwKyU+3rh0hx8Vpc1U51+bxoj5Pp4HYIlGIgZXoI1RdGL0pwkIsutDlRJeZo eMbl8IvRryK8KKSvUx9iATOCvykgNVZmZAL5OiQXN7WMMTymEqpHUBsmrV7QgdiS+nQhFtNLayA 5OLEHKEVF22Q4jQuNBBhGuiwqZUH1yaL38Qe7TtMh6JnYrfarEBeHXCb4vftaFVjYFq6YTzqweO Hv7qgFJHa3DE6y0CzdqkV1pKW1yFU1FhUmnbQaUR6wTFMcv5U4iam6sV945D7M6TpJBqt8h2je6 hQx6y50S6KdhjXv+EXlSMH3G0RMVuEnkWNKZ+9jjN/NxiRFLvmQPbsiJ0lkPwUtqjTIHcOqlFAG q2yeA X-Developer-Key: i=khorenko@virtuozzo.com; a=openpgp; fpr=560F6DC83DC5D3D063BD082C51960A47F9615C2A X-OZ-Fwd: true Cc: devel@openvz.org Subject: Re: [Devel] [PATCH hci-8.1 v2 1/1] 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, ethtool_rmon, hw_stats_l3 and > hw_stats_l3_gre need hardware: link speed, extended link state, rmon > counters, L3 statistics offload. With no interfaces configured lib.sh > substitutes a veth pair, and every case fails on what veth does not > have. > > Upstream runs these tests on real hardware only and dropped the veth > check in commit 0c499a351777 ("selftests: forwarding: Ditch > skip_on_veth()"), so this patch is not for upstream. > > Skip on veth before sourcing lib.sh, which creates the pair as it is > sourced and would leave it behind. The check reads forwarding.config > the way lib.sh does, so real interfaces configured there are honoured. > > https://virtuozzo.atlassian.net/browse/VSTOR-139651 > Feature: fix selftests > Signed-off-by: Eva Kurchatova > > diff --git a/tools/testing/selftests/drivers/net/hw/Makefile b/tools/testing/selftests/drivers/net/hw/Makefile > index e556b5150a51b..39aece5e27767 100644 > --- a/tools/testing/selftests/drivers/net/hw/Makefile > +++ b/tools/testing/selftests/drivers/net/hw/Makefile > @@ -19,6 +19,7 @@ TEST_PROGS = \ > > TEST_FILES := \ > ethtool_lib.sh \ > + skip_on_veth.sh \ > # > > TEST_INCLUDES := \ > diff --git a/tools/testing/selftests/drivers/net/hw/ethtool.sh b/tools/testing/selftests/drivers/net/hw/ethtool.sh > index fa6953de6b6dd..b9eeeb56589ff 100755 > --- a/tools/testing/selftests/drivers/net/hw/ethtool.sh > +++ b/tools/testing/selftests/drivers/net/hw/ethtool.sh > @@ -11,6 +11,11 @@ ALL_TESTS=" > " > NUM_NETIFS=2 > lib_dir=$(dirname "$0") > + > +# Needs a device that can set link speed and autonegotiation > +source "$lib_dir"/skip_on_veth.sh > +skip_on_veth > + > 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 a7584448416ea..fd3ecd9623420 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,11 @@ ALL_TESTS=" > > NUM_NETIFS=2 > lib_dir=$(dirname "$0") > + > +# Needs a device that reports an extended link state > +source "$lib_dir"/skip_on_veth.sh > +skip_on_veth > + > source "$lib_dir"/../../../net/forwarding/lib.sh > source ethtool_lib.sh > > diff --git a/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh b/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh > index 8f60c1685ad4b..91445a379face 100755 > --- a/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh > +++ b/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh > @@ -8,6 +8,11 @@ ALL_TESTS=" > > NUM_NETIFS=2 > lib_dir=$(dirname "$0") > + > +# Needs a device with rmon histogram counters > +source "$lib_dir"/skip_on_veth.sh > +skip_on_veth > + > source "$lib_dir"/../../../net/forwarding/lib.sh > > ETH_FCS_LEN=4 > 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 67fafefc80bea..13104dc7d8190 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,11 @@ ALL_TESTS=" > " > NUM_NETIFS=4 > lib_dir=$(dirname "$0") > + > +# Needs a device that offloads L3 statistics > +source "$lib_dir"/skip_on_veth.sh > +skip_on_veth > + > 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 a94d92e1abce6..b94b2338c853b 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,11 @@ ALL_TESTS=" > " > NUM_NETIFS=6 > lib_dir=$(dirname "$0") > + > +# Needs a device that offloads L3 statistics > +source "$lib_dir"/skip_on_veth.sh > +skip_on_veth > + > source "$lib_dir"/../../../net/forwarding/lib.sh > source "$lib_dir"/../../../net/forwarding/ipip_lib.sh > source "$lib_dir"/../../../net/forwarding/tc_common.sh > diff --git a/tools/testing/selftests/drivers/net/hw/skip_on_veth.sh b/tools/testing/selftests/drivers/net/hw/skip_on_veth.sh > new file mode 100644 > index 0000000000000..845cc65b1df7c > --- /dev/null > +++ b/tools/testing/selftests/drivers/net/hw/skip_on_veth.sh > @@ -0,0 +1,22 @@ > +#!/bin/bash > +# SPDX-License-Identifier: GPL-2.0 > + > +# Source with lib_dir set, ahead of lib.sh, which creates the interfaces. > + > +forwarding_dir="$lib_dir"/../../../net/forwarding > + > +if [[ -f $forwarding_dir/forwarding.config ]]; then > + source "$forwarding_dir/forwarding.config" > +fi > + > +: "${NETIF_CREATE:=yes}" > +: "${NETIF_TYPE:=veth}" > + > +# Call before sourcing lib.sh, exiting after it leaves the veth pair behind > +skip_on_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 NAK This skips a valid hardware setup. create_netif_veth() only creates the interfaces that do not exist, so NETIFS naming real NICs with NETIF_CREATE/NETIF_TYPE left at the defaults works in lib.sh - and that is what you get by editing forwarding.config.sample, which does not mention either variable. Such a host skips all five tests, and the message advises what the user has already done. Check the device kind instead; that works before lib.sh too, forwarding.config is already read here: local p1=${NETIFS[p1]} if [[ -n $p1 ]] && ip link show dev "$p1" &> /dev/null; then kind=$(ip -j -d link show dev "$p1" | jq -r '.[].linkinfo.info_kind') [[ $kind == veth ]] || return elif [[ "$NETIF_CREATE" != yes || "$NETIF_TYPE" != veth ]]; then return fi echo "SKIP: ..." exit 4 On a bare host NETIFS is unset, the elif still skips. -- Konstantin Khorenko _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel