Article View: linux.kernel.netdev
Article #24867Re: [RFC PATCH net-next 6/9] amt: KUnit cases for the offload contract
From: Antonio Quartulli
Date: Tue, 01 Dec 2026 00:34
Date: Tue, 01 Dec 2026 00:34
33 lines
11077 bytes
11077 bytes
On Sat, Nov 07, 2026 at 06:44:28PM +0000, Omar Ramadan wrote: > drivers/net/amt.c | 2062 +++++++++++++++++++++++++++++++++++++++++++++ This puts 2062 lines of tests into amt.c, which grows to about 8.6k lines, roughly a quarter of them test code. Please move the suite to its own file and use VISIBLE_IF_KUNIT / EXPORT_SYMBOL_IF_KUNIT for the internals it needs, if cannot be avoided. As built today it also breaks the link. With AMT=y and KUNIT=m, AMT_KUNIT_TEST is m, and the built-in amt.o references symbols that exist only in kunit.ko: ld: amt.c: undefined reference to `kunit_binary_assert_format' ld: amt.c: undefined reference to `__kunit_activate_static_stub' ld: amt.c: undefined reference to `kunit_kmalloc_array' The Kconfig entry comes from one of your dependency series, but this patch adds most of the code that trips it. Make the option bool, or for example make it depend on KUNIT=y || AMT=m. With KUNIT_ALL_TESTS=m, as some distributions build, the fake provider and the suite ship inside the production amt.ko and run at modprobe. They change module-global state there: the provider list and the refused counter. Patch 3 also puts KUNIT_STATIC_STUB_REDIRECT into four production helpers. Since amt_ofl_op_overran() is one of them, I think the timing logic it implements is never exercised by these tests. Regards, Antonio
Technical Details
Message-ID:
<20261201003458.3731956-7-antonio@mandelbit.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374559-linux-kernel-netdev=dewy.ruReferences:
<20261107184437.2783174-1-omar@blockcast.net> <20261107184437.2783174-7-omar@blockcast.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374559-linux-kernel-netdev=dewy.ru From: antonio@mandelbit.com (Antonio Quartulli) Newsgroups: linux.kernel.netdev Subject: Re: [RFC PATCH net-next 6/9] amt: KUnit cases for the offload contract Date: Tue, 1 Dec 2026 01:34:53 +0100 Organization: Usenet Network Message-ID: <20261201003458.3731956-7-antonio@mandelbit.com> References: <20261107184437.2783174-1-omar@blockcast.net> <20261107184437.2783174-7-omar@blockcast.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1576121"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ySOQRj1e+MufdYfqN5j4X6vyocg= sha256:A0zpCYRX6R74WRsku/f/fqCmFFzCESup0IxDSGM+kjI= sha1:3kn43HVRVliphl+Z3Rg4azjvxv0= sha256:XC8WEPz+hl9cYYi8hNyas++tmyKdBiXbXIxF8GqIqTA= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id D9951126018; Tue, 1 Dec 2026 03:35:42 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.15 X-Spam-Status: No, score=-3.15 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=mandelbit.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2xN-o16-Z8U5; Tue, 1 Dec 2026 03:35:40 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374559-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mandelbit.com X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 2F883126015; Tue, 1 Dec 2026 03:35:31 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 985F225C69; Tue, 1 Dec 2026 00:35:28 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796085324; b=1OpF0xjeTOaJba5dXP9hOLdQHWTf5avb2G74PHEM8s+0D5ym4Il8SklFymPdxQhjyDhp jmvhAMGLQWG7vEhZE/Rd/jTB2Xn/qLGo/T/TeroRzrddcKcCFyxbYls32tfSJn8GemlIU dHtNCstLmfptjwtksdtZHPNGcj6pyaBGNa46E0Ycmi1iPnHh4Jc2FIzsTqjdeP/+1zQM0 MY76uDVODmCQ8Peohv++5MDkC40/YY/ZgiUzsAEH6d65GvkNk20Cg2NU3y8EducF1aOBC m3kG9dU1XSu8VBQK9h3M8EWq5IwUKEJ4DDW427nd+MvZy2XHgdTZiuK3cjoNjSF2sWA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796085324; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=zFb46/6SNsEhk1LXRs73fCfpZzD/3yTI6XaWMWIIpX0=; b=y+X3B640erxiF3UZx2mA3x00f7Dnnql7A05c1vgC5Bz9okydxG72UPkCNjf2B3568mhs DslF0K7wHhR596wuccaGMuJp2WKLNdMkd+kOC6/PMOAOpVePyjhWKiLRG8Rp98KC/g7Fa 3QrLgzaGR0SGqTQPAiOaB6JxEMJ0y+aiNP1GppnvMUPF9LrtbAnvyYqotWQbLNKi7XWgs PA5eV85eHXHmbr5C2n5ZqeunT7p/QKy99oCP7pmmk3PJBbR4kAfVQZM0+ya0w48F2/fmA pL9mfU7yrohruL9y/hZ+lP65CcWyH0/CR9obg92kYirGV5zLSavtIj+3jgHP+mNPXVw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=V68iE7tH; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0DDE606A327; Tue, 1 Dec 2026 00:35:24 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=V68iE7tH X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.50 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796085323; b=rvdIidKzLK97J6y+o1c3Fd7X+iRekMJyIO1GABMDTBjmagOFkFipP+g002YrsuJNuLr7 1hzD3SceK86yD5Oq7ejtuB98fsTwUFR7n0Y3O6W74bwXaya/flkAUSacn2L5PHiAXgHIe rS46MmNhmiY6hZorp/94sdpWBeZL9jUqyMZbWB9mHDGrh0IO0oddmevzck+/vmCfLyr6Q aYpQ1/6ImEJ0Dcxg8Ci2lTDFgN3O9BNqE4SjVX7ZqIU78ehKo3QeGAzQD1QIIMhnePMcR AnBAOOBoKaTf2lohWaO+MXufprwsNEZGH1o/ndAQocyu6ziPVjgW2G469/zIfSXsGyA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796085323; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=zFb46/6SNsEhk1LXRs73fCfpZzD/3yTI6XaWMWIIpX0=; b=azTYFWfFF5kpJ1RrL+Udv0SqJQ0d4zlSnpfeFpYGMtad0sCuPM4lY0GbejyJRiytbdUZ 41T4m8RDHP9/6hZWKqlvRoMI1ESGoCMm7BXal9+HJ6iDaUCtxQGJ/6/5Fy/rzkBIooAl3 2vt1sstpshOxZBsK2f1TljGWoIvn1AGIS9Av3hSSXIDsmL6RIhqujki9JwXyqMF9Qaeim SKdHK44sXAGrqwAjHYPyGXEo2vVm0vcIzony/EA1x11a5AYQgyh1wsXd2pY3Q8SBf3o/7 KctXibxGHh6SXMlpw71TY74aB3d4O5Ata4k5cU+okLd3Kr60GZhrRIl8tQLgKT2WmdA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=V68iE7tH; arc=none smtp.remote-ip=195.10.208.50 X-Received: from mout-b-105.mailbox.org (mout-b-105.mailbox.org [195.10.208.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52905606A684; Tue, 1 Dec 2026 00:35:23 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 52905606A684 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com X-Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-105.mailbox.org (Postfix) with ESMTPS id 4jdhkH6Txtz9tN6; Tue, 01 Dec 2026 01:35:19 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796085319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zFb46/6SNsEhk1LXRs73fCfpZzD/3yTI6XaWMWIIpX0=; b=V68iE7tHxyDSRyI+iuudawnNCHs3Dkow/0cY3WLVa+fWohRjYgchkIkVb5xm/lWVmFo0i9 g68App3nHkb626W3tMxY9Oj0IxmAnjBN2EMFlbGZ3YGcVQYuslsJdVZRc0sz+8THjF7AKc ahCdUmmod8JJonTFyLVwamwAGtJ7mkNPdjxFpfq29KtaXQMehVwJDMt98aUr97ms7dWUaD 4+Y5E8+IwVNL0sqsCJQ1Gj8XwTBVs4jeZD0VKUaT5C5JTv9wajRq0uYUibjyRLPYEpp2ac 9SZZZ6xvEB6T079fLfIsjNKtp/j0/2SxdYZWN+sArgHVPCQemxUng8yYi2Ofhw== X-Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=antonio@mandelbit.com X-Cc: Antonio Quartulli <antonio@mandelbit.com>, Taehee Yoo <ap420073@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michael.chan@broadcom.com, pavan.chebbi@broadcom.com, saeedm@nvidia.com, leon@kernel.org, tariqt@nvidia.com, mbloch@nvidia.com, brett.creeley@amd.com, sgoutham@marvell.com, anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, intel-wired-lan@lists.osuosl.org, Ido Schimmel <idosch@nvidia.com>, Satish Kharat <satishkh@cisco.com>, Andrew Lunn <andrew+netdev@lunn.ch>, Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>, Kees Cook <kees@kernel.org>, "Gustavo A. R. Silva" <gustavoars@kernel.org>, linux-kselftest@vger.kernel.org, linux-hardening@vger.kernel.org X-Mailer: git-send-email 2.56.1 X-In-Reply-To: <20261107184437.2783174-7-omar@blockcast.net> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Rspamd-Queue-Id: 4jdhkH6Txtz9tN6