🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #4687

Re: [PATCH net-next] selftests: net: exit with test failure status

#4687
From: Hangbin Liu
Date: Mon, 19 Oct 2026 00:33
24 lines
6660 bytes
On Sun, Oct 18, 2026 at 02:48:21PM +0300, Ido Schimmel wrote:
> On Wed, Oct 14, 2026 at 01:32:24PM +0800, Hangbin Liu wrote:
> > From: Hangbin Liu <liuhangbin@kylinos.cn>
> > 
> > fdb_flush.sh, fib-onlink-tests.sh and l2tp.sh can print [FAIL]
> > subtests while still exiting with status 0. Their log_test(), aka
> > log_test_expected() in lib.sh, helpers record a failure in ret, but
> > the scripts never propagate ret to the exit code, so a kselftest runner
> > treats the run as a pass.
> > 
> > Initialize ret and exit with it at the end of each script so failed
> > subtests are reflected in the exit status.
> > 
> > Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
> 
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
> 
> fib_nexthop_multiprefix.sh seems to suffer from the same problem

Oh, let me update it together. There is no need to bother another patch.

Thanks
Hangbin
Technical Details
Message-ID: <atVlXsbU3YNwXmrH@fedora>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348215-linux-kernel-netdev=dewy.ru
References: <20261014-self_ret-v1-1-6b5a95ba6106@kylinos.cn> <20261018114821.GA2470373@shredder>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348215-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next] selftests: net: exit with test failure status
Date: Mon, 19 Oct 2026 08:33:34 +0800
Organization: Usenet Network
Message-ID: <atVlXsbU3YNwXmrH@fedora>
References: <20261014-self_ret-v1-1-6b5a95ba6106@kylinos.cn>
 <20261018114821.GA2470373@shredder>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="3468738"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:lKZ2oyu12oT4xTiu22bYJrbdljY= sha256:vdDOn/ZI/Q04ilahNNUGAttLlCWZp5eIWAZr1Pt+XVs=
	sha1:WEpyqqxsx/baI3eOS8ILRZaS/Lw= sha256:iNt9/v5ZV72XlPRoSxJ+OHvJLhlV8CXfTB5jUnMhmw8=
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 F25091108CB; Mon, 19 Oct 2026 03:34:16 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 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] 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 86JHbs5qvoeV;
	Mon, 19 Oct 2026 03:34:08 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-348215-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 834511108CA; Mon, 19 Oct 2026 03:33:56 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sin.lore.kernel.org (Postfix) with ESMTP id B18A629874; Mon, 19 Oct 2026 00:33:47 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 8396226738D;
	Mon, 19 Oct 2026 00:33:45 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Cj16Ysw+"
X-Received: from mta1.migadu.com (out-112.mta1.migadu.com [95.215.58.112])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 287EF2DA768
	for <netdev@vger.kernel.org>; Mon, 19 Oct 2026 00:33:42 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.112
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792370025; cv=none; b=tRAHFe8Fghd3rToDP6LpTBfHyNy+BsaVnmT91Nwf+sb1DxmhdeyJqoDQMbZjtJDZUlHabSKFUVlPaTntgtkhAwVsfOvitM0LSkFftYzfeRKfl+9AEdN9Z3ADNnyPjQq0guxGw7NrvjRxb/T4xcRHJWwANIS545McbJPck8lT7qs=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792370025; c=relaxed/simple;
	bh=HZkA8SDHue5Y450hQGCufHdAi8YP3S4vOtjG0PEnPvk=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=iFAv15LsGH2rQ/twxmvwClhw353ot0C+0uUdr7rpuSaUlSTXo270VUXAXzpEfg7QGa5xfuphaqfKyQVWf38rnsouaLRnBf/7khVQqu83yzs2/HNrEzU9yh2x2WzMDq4Eld566jK25boJwp4c832bpSLmtc1nRTFRdJaEZjp4bNQ=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Cj16Ysw+; arc=none smtp.client-ip=95.215.58.112
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=HZkA8SDHue5Y450hQGCufHdAi8YP3S4vOtjG0PEnPvk=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1792370020; v=1; x=1792974820;
 b=Cj16Ysw+mNj531KO1FFM2aTv8PmJOPkjLTNGR0FfsNizB1T9fU8Gmk/ActT6Bd9OJdOruUc1
 s3KLaEXY6U0NmZFzB0KQthFkVcCn6P40uL5Ih/VknJ1CZWaQGAyJ8SO2uhRXxqnKFXKKJllFAXk
 efBR3WDmLo7QVmYG8yF2nWEg=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta12.migadu.com with ESMTPS id e47ba85f2e4f76c7;
	Mon, 19 Oct 2026 00:33:40 +0000
X-Mizu-Trace-ID: e47ba85f2e4f76c7
X-Migadu-Flow: FLOW_OUT
X-Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	David Ahern <dsahern@kernel.org>, netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hangbin Liu <liuhangbin@kylinos.cn>
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261018114821.GA2470373@shredder>