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 615958013F for ; Mon, 31 Aug 2026 23:45:30 +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 67VNiKw8032133; Tue, 1 Sep 2026 02:44:21 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 67VNiKw8032133 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="MpTdtA1n" Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 67VNiEYl032109 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 1 Sep 2026 02:44:15 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 67VNiEYl032109 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-482e2541c30so225863f8f.1 for ; Mon, 31 Aug 2026 16:44:14 -0700 (PDT) X-Gm-Message-State: AFuF++nW3L8PjjDMSyBHxydgVhlw+zB4i3oJvuOy7v6GWrM6ICgmE57L hroW2hrpu/NFY8DV2eqOgtBFUOxy6AQbQAg7molypzgrOnRO7iWMaErm8kh00mvV++DvNNprZ4c zUBs5ZY39UrH0W4L257t1dOKyYpY3p/XI594zuSUsbW9rAByV3s3oFg== X-Gm-Gg: AYBFou3h5/q2CjnPiZKklFiNVSpZxMpLlHkBOs7OkmVhOpO5a/yqQDZTiYLi/BIMsWg RCSZkYCzjEiYgFCVlAuCFQna+puRsXTgZAmG4nE9UJmZNc+1XE64+dVg7SWYt66QGEtUfpBtnlD KrsHN3X1fxZfXAXTiPwacwj+WnqFiryF7vm2ftfEs485kv+0Ci+qTD8MSL++ljHG2dJmPHk+UqG QEjTfYAlmv+lq3uBhsDa5YXNX8gz0kweS6Wo/aV0I3VNSZWVXsQvIifEO7bj7uXEj98SUOmphNm s7pxW/p4btVLd4Kg2GVV6jLtrl4x7DFcEkd1lhz1Cwjgv5HwlOoafnBFaELXOYgICUkkQNyfvu2 87k2APv3hbgUxleWPxyaftsJh X-Received: by 2002:a05:6000:4613:b0:482:e658:7a39 with SMTP id ffacd0b85a97d-484421d46femr3100164f8f.11.1788219854569; Mon, 31 Aug 2026 16:44:14 -0700 (PDT) X-Received: by 2002:a05:6000:4613:b0:482:e658:7a39 with SMTP id ffacd0b85a97d-484421d46femr3100111f8f.11.1788219854092; Mon, 31 Aug 2026 16:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788219854; cv=none; d=google.com; s=arc-20260327; b=om+D2UJvP+8tGBVJ5GAwBpMm+b252I5HQai8EsgPzYes113Tf4re2IZo0fioaKhaL+ CrnkvFfxgwStruqv19L6GsIpJ2hAwZlqlf6NVbohC3UQ0k8AvR7LoCyiR5X1WTC0sRu9 IUjLMtxuA/6ZmDn6X2wTfuVmCgFnXbe2MjIY3usyAZzR+1tnGRULR1ZGwrABlYeLCDEz UQuk7KTPpiea8iHvHmS2OaqVvVxPX3e4opaCNgwWUB0/9tUIlvfo+OhGpZqRKhu9XBl2 9y6kerhmGA6qZmR/tjLdeog0qbIejgT+NRGQ5nKKOjrxi3uBXKq7XjxyNEY552xQvORS QL/w== 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=kk3gxzPT5/wm4lf39niCxcF2PdwTfXBWE0T94hcRhds=; fh=WpT6aB7RBAGHZeWZzqAr71yzRFbPTYkPWKsRagLn48Q=; b=oUpZYxvCiSzl1B+nE7aK1D1s7i3te9ZgOO+SXcXEyedwFsavx3KWM2DuuHi2YN12ZA dFIXAnFbusAKSL9a0OzVs6Ndu5EYF5h5jUPn5Ho73pbSYjYh5tkPyHHsTb14SoZRunlA Ox4M6cVxX64db5BhLXPyzkw1veCakaMEyIqIS1RDQh3yD5S7qGWKZ0tq3Qqg1X1+b8dV dCIIiDpu8QMEJlxTVWRnHij174oCGzSOobCzm5vUG89V9EBGx2ki8R93RuQ0pPTP+fGq 3+rks7kll3Yhsrxr07zCC94ot/H+PBqyo/EGyE9KWOV5ZV45bfUzV63PXa7jVHL+UYQM ItWQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=MpTdtA1n; 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-48442d7bebfsi927750f8f.297.2026.08.31.16.44.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2026 16:44:14 -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=MpTdtA1n; 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=kk3gxzPT5/wm4lf39niCxcF2PdwTfXBWE0T94hcRhds=; b=MpTdtA1nKhgJ LEryYifgnvWGtqKq9C2rONvKBjmi+a5dfLa6zmcA/acO/jlZOGvQk1y8/vXc/7H9ID1/RbLCIwvSu eRlttDyh8R+dyxl6JWf9D2fJo4MFcKOxQ9bWHRQiYa6//gUFysTXJddtgXO4WHkASc7CoDNePb33l SVNTl15mKeSWrXksheq4pt2AEQlTMi7jvZxc5YHAAr08phEspqj/V9q/T9VjhjaZchg6JFWcPK7mb gKv38r94/ub+lFSgzEcciyOJJx6QZzy/1BimvyzWcdgmr+zSs/Tn0nRT94rvLLVM1wQ4CrDr5Kr2Q 4SUHgkQDGBqzx98G6JczQQ==; 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 1x1BdK-00AoFq-3D; Tue, 01 Sep 2026 01:44:04 +0200 From: Eva Kurchatova To: khorenko@virtuozzo.com Date: Tue, 1 Sep 2026 02:43:49 +0300 Message-ID: <20260831234411.1649762-3-eva.kurchatova@virtuozzo.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260831234411.1649762-1-eva.kurchatova@virtuozzo.com> References: <20260831234411.1649762-1-eva.kurchatova@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH vz10 3/3] selftests: drv-net: read the channel count over netlink 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 napi_threaded needs the number of combined channels of the device and asks ethtool to print it as JSON. Not every ethtool prints that one: ethtool 6.11 does it for -k, -a, -c, -g and -x, but not for -l, and the test ends in the first case: CmdExitFailure: Command failed: ethtool --json -l eth4 STDERR: b'ethtool: bad command line argument(s) JSON output not available for this subcommand not ok 1 napi_threaded.napi_init Ask the kernel for the count over netlink, which is where ethtool reads it too, so the test no longer depends on the ethtool version installed. Changing the count stays with ethtool -L, which needs no JSON. No other test in the group asks ethtool for something it cannot print, so this is the only one that needs it. https://virtuozzo.atlassian.net/browse/VSTOR-139651 Feature: fix selftests Signed-off-by: Eva Kurchatova --- tools/testing/selftests/drivers/net/napi_threaded.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/drivers/net/napi_threaded.py b/tools/testing/selftests/drivers/net/napi_threaded.py index 20f1a12552da..6662aee3442b 100755 --- a/tools/testing/selftests/drivers/net/napi_threaded.py +++ b/tools/testing/selftests/drivers/net/napi_threaded.py @@ -7,7 +7,7 @@ Test napi threaded states. from lib.py import ksft_run, ksft_exit from lib.py import ksft_eq, ksft_ne, ksft_ge -from lib.py import NetDrvEnv, NetdevFamily +from lib.py import EthtoolFamily, NetDrvEnv, NetdevFamily from lib.py import cmd, defer, ethtool @@ -28,7 +28,13 @@ def _set_threaded_state(cfg, threaded) -> None: def _setup_deferred_cleanup(cfg) -> None: - combined = ethtool(f"-l {cfg.ifname}", json=True)[0].get("combined", 0) + # Not every ethtool prints the channel counts as JSON, the one on + # the test machine here does not: + # ethtool: bad command line argument(s) + # JSON output not available for this subcommand + # Ask the kernel for them instead, it is the same number. + chan = EthtoolFamily().channels_get({'header': {'dev-index': cfg.ifindex}}) + combined = chan.get('combined-count', 0) ksft_ge(combined, 2) defer(ethtool, f"-L {cfg.ifname} combined {combined}") -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel