Article View: linux.kernel.netdev
Article #22217Re: [PATCH net-next v7 0/2] selftests: net: veth: propagate check failures to exit status
From: Hangbin Liu
Date: Wed, 25 Nov 2026 00:41
Date: Wed, 25 Nov 2026 00:41
55 lines
10920 bytes
10920 bytes
On Tue, Nov 24, 2026 at 10:40:23PM +0100, Omokefe Emmanuel Onanaroghene wrote:
> Four checks in tools/testing/selftests/net/veth.sh report failures
> without setting ret, allowing the script to exit 0 even when a check
> fails. Set ret=1 in chk_channels() and the three "bad setting"
> negative tests identified by Tianyi during review of v2.
>
> Patch 1 fixes the invalid TX channel test, which used nproc + 1
> to determine an out-of-range value. However, nproc can be lower
> than num_possible_cpus() when CPU affinity or cpusets restrict
> a process, meaning the kernel may accept the requested queue count.
> This could cause false failures on a correctly functioning
> kernel once the propagation patch makes failures honest.
>
> Use the kernel-reported max_tx + 1 instead, ensuring the
> attempted value always exceeds the device's supported maximum.
> Spotted by Sashiko AI review of v2.
>
> ---
> v7:
> - Fix [1/2] subject numbering, lost in v6's send
> v6: https://lore.kernel.org/all/20261124211645.5751-1-emmaonana18@gmail.com/
> - Squash the two propagation patches into one and add
> Tianyi's tags.
> v5: https://lore.kernel.org/all/20261121182217.4609-1-emmaonana18@gmail.com/
> - Retarget to net-next and drop the Fixes tags
> - Move the invalid-tx fix first, so no commit in the series can
> report a false failure on a correct kernel.
> - Fix the subject prefix on the invalid-tx patch, lost in v4's
> send.
> v4: https://lore.kernel.org/all/20261119003003.40482-1-emmaonana18@gmail.com/
> - Patch 2: use if/else instead of "&& { ...; } ||" chains, keep
> lines within 80 columns (thanks Tianyi for the review).
> - Add patch 3 deriving the invalid tx value from the kernel maximum.
> v3: https://lore.kernel.org/all/20261116084107.6675-1-emmaonana18@gmail.com/
> - Add Tianyi Gao's Tested-by to patch 1 (thanks!).
> - Add patch 2 fixing the remaining three checks.
> v2: https://lore.kernel.org/all/20261115214702.50817-1-emmaonana18@gmail.com/
> - Correct Fixes tag to 1ec2230fc721.
> v1: https://lore.kernel.org/all/20261115212117.48496-1-emmaonana18@gmail.com/
> - Initial posting.
>
> Omokefe Emmanuel Onanaroghene (2):
> selftests: net: veth: derive invalid-tx test value from kernel max
> selftests: net: veth: propagate check failures to exit status
>
> tools/testing/selftests/net/veth.sh | 31 +++++++++++++++++++++--------
> 1 file changed, 23 insertions(+), 8 deletions(-)
>
> --
> 2.43.0
For the series
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Technical Details
Message-ID:
<20261125004133.GA19338@Liu-laptop>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370933-linux-kernel-netdev=dewy.ruReferences:
<20261124214025.11603-1-emmaonana18@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370933-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v7 0/2] selftests: net: veth: propagate check failures to exit status Date: Wed, 25 Nov 2026 08:41:33 +0800 Organization: Usenet Network Message-ID: <20261125004133.GA19338@Liu-laptop> References: <20261124214025.11603-1-emmaonana18@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="74940"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Cak23SDDi0RFGxAitEZMBc6k+sI= sha256:WdP5HLq104lDhoq2Rn/z+IOHhaRDuK+1mO3IfX92XZ8= sha1:pS0XQL0vp3qVn/ckTKmn3DxWAxc= sha256:+rsDpNlVfszLoBaSmh4w39sY4WfRY5DE/W+oe4Pbu9g= Content-Disposition: inline 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 73162125E37; Wed, 25 Nov 2026 03:42:09 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, 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 (1024-bit key) header.d=linux.dev 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 VGu9Aujd_Xx0; Wed, 25 Nov 2026 03:42:04 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-370933-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 60F14125E2F; Wed, 25 Nov 2026 03:41:55 +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 81FE537A4B; Wed, 25 Nov 2026 00:41:54 +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=1795567313; b=rWkK+JOeu6Yiaxyf9S6sN8Kq+jHtcH9yB5AhEPxXzbcdYyjajmgdSfxWjvyAFypa2h/I MJd3EI0XT8fZpxbR9UZQr+e5yIvDqimKgBHtFnDXykGOgmIxcHdsqtzfGqV52F2a3JYA7 /imoX3eKgJu9nX8493R7Oo+TYU69GaBhdtWTUNTNGhqRl5yKRcmy/eMRBBDCgjehJkF0v 7x2xxz2+R180GJuTieMtRS9ETSrt3uOndr/6wdpPmvobdxHr6eZL2IUYh9R3+fKAUP/bC bbjzwhvMBaO5KJ9baQB1BnPza2pQKZxYU1h9bNtatDalHbf1RzkojZfx5kt+rrBKO0w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795567313; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=8Az4QnI06D29dHXRhcW0bCRSFOGyh4xpIpsF5fwFiHs=; b=ZRDIJ7rHVVeLm0uzODJxavcA2hL90sB5ZzURTz3q7NhWki8goKhvAYJU+Hynse+FPloX G+dFUIzAwysexa3jw2cOPRayrRlSzpwOQxWpeaI5NXd5UgsElbMCCZhiZD92bAwNGLmSK EnNH/rx8QKtlIimicBoC5/KOJUrJRWf1gloknD1TFA42reeA0Ts48u+sd6tWDM6CCV1iW XIeESf8BYkd08TsmcoTMYv8oM4Ore/tNxjXZBMaZkbAFE8d0fSEbvUQhPEbaX3HsP4SBx 1GQj1YrbBmYLLB8bDnoQ0jYUA3/qvtlLKM7T9zZE285r1J/FrXioA6gcLRqNkj76KXg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=pKlQ4H04; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; 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 A9FD0606A338; Wed, 25 Nov 2026 00:41:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=pKlQ4H04 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.251 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795567312; b=vH65VwpwbeN58kW7boqCbEQwSHCWf/n5FZtpWAJYWw7jwNLcR87PMDExzn4Gg1SJAhyg UqC+UUZtCi9Owgm0D2Fs7oAQfS7CY8G5Ad4iccp28V+RRMXPdtB7U5Fld8eestd3YQIX9 UORTtL6R8upiW5z7QocsNSEHRzwnC74O1tSdVFniFxGe1PxjoRugpElwAlKL6107Ad4Bd wCd2mMmNPktI+vhiiq4GDnR9/CWC6m3OnKuFtOLTE3YN5N/Nbn4aAY0QniW8PHA6UWq3R LnUMIY5OWeax3H3FSj/gNtuIyP/tAPDSEGCkh5zJSNZ8KNgzddanDG0NOxOc98ks7xw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795567312; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=8Az4QnI06D29dHXRhcW0bCRSFOGyh4xpIpsF5fwFiHs=; b=j6T7+O6crxgasA/hDpXO9BKBubr2I/uPfA71z3CiQFUdf7xwlFkUiEwJHClOA+lrKWhL jcy7cMlNCg+B7L4+Sy7pV7aex+NqAluSRSoX8nf94rxOzB1ZctUVYXgk2tHTNe44I2cer lx5R5zuVC0IekcIvmZJ1GB4eVFA1msm+3muidYZYuhPht4dwSqpOOoD62ai6XazIfWQGb V8LfMOFG0ymRDgyCVFXSPwH1EiHzP/8zpK1F3NSV7BK1OQ8pf0hBQneWoK+dnI6dKZ1Vd 65RzBLRYk9hZJwmUGG7kh7jh/AMVPGEhQrKaCGW2eoC9SF2MvAzRNqhcByh1ux4LOmg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=pKlQ4H04; arc=none smtp.remote-ip=91.218.175.251 X-Received: from mta0.migadu.com (out-251.mta0.migadu.com [91.218.175.251]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6726C606A327 for <netdev@vger.kernel.org>; Wed, 25 Nov 2026 00:41:50 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6726C606A327 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=5i8hmMKtVuUHVs5NH7TmYS/sUbqisINq3nsbH7cRRPs=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795567309; v=1; x=1796172109; b=pKlQ4H04THnNWoJVfS2vJcLHgsjI4fgwR5aF3d91SzckFaOwOTevyGi+53tCLOOVa1QE11e9 0Y9XpYJeQxoLo0YBLR9qpsMt7V+kJEAfGLP+EIu2xs2VhFrGHfeshsOvs+aV58l1Kta1f8hB+ZL A1aETZ3s5AVT8+mlLpBGg8NQ= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta11.migadu.com with ESMTPS id c69787d82d27ec28; Wed, 25 Nov 2026 00:41:49 +0000 X-Mizu-Trace-ID: c69787d82d27ec28 X-Migadu-Flow: FLOW_OUT X-Cc: tianyi@cloudflare.com, kuba@kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com, horms@kernel.org, shuah@kernel.org, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me, skhan@linuxfoundation.org, kernel-team@cloudflare.com, tianyi.gao@linux.dev 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-In-Reply-To: <20261124214025.11603-1-emmaonana18@gmail.com>