🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #14363

Re: [PATCH net] selftests: netconsole: enable the targets created by the torture test

#14363
From: Hangbin Liu
Date: Wed, 11 Nov 2026 01:58
49 lines
10445 bytes
Hi Breno,
On Tue, Nov 10, 2026 at 04:32:25AM -0800, Breno Leitao wrote:
> create_and_delete_random_target() is meant to create, enable and remove
> targets while messages are sent, but it only creates and removes them.
> The helper it calls, _create_dynamic_target(), stopped enabling the
> target when the bonding test moved that step into
> create_dynamic_target().
> 
> Enable the targets again, so they come up while messages flow and are
> disabled before being removed. Like toggle_netcons_target(), ignore a
> failed enable, which would otherwise end the function and leave the
> targets behind. With a console per target, this also registers and
> unregisters their consoles under load.
> 
> Fixes: 236682db3b6f ("selftest: netcons: add test for netconsole over bonded interfaces")
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
>  tools/testing/selftests/drivers/net/netconsole/netcons_torture.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/drivers/net/netconsole/netcons_torture.sh b/tools/testing/selftests/drivers/net/netconsole/netcons_torture.sh
> index 33a44adb6f8f3a..3dfab0bf1b0756 100755
> --- a/tools/testing/selftests/drivers/net/netconsole/netcons_torture.sh
> +++ b/tools/testing/selftests/drivers/net/netconsole/netcons_torture.sh
> @@ -46,6 +46,7 @@ create_and_delete_random_target() {
>  
>  		# Basic population so the target can come up
>  		_create_dynamic_target "${FORMAT}" "${RND_TARGET_PATH}"
> +		echo 1 > "${RND_TARGET_PATH}"/enabled 2> /dev/null || true
>  	done
>  
>  	echo "netconsole selftest: ${COUNT} additional targets were created" > /dev/kmsg
> 
> ---
> base-commit: b3dfbde62cf1981c4638939c159dfd087b7a72e9
> change-id: 20261110-netcons_selftest_fix-4cbf633295ef
> 
> Best regards,
> --  
> Breno Leitao <leitao@debian.org>
> 

Ignore the failed enable makes sense to me, as we enabled `set -e`
and use random target. Do we need sleep 1s like create_dynamic_target()
to make sure the configuration loaded?

Thanks
Hangbin
Technical Details
Message-ID: <avPLyMTFkhCRqRAS@fedora>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360818-linux-kernel-netdev=dewy.ru
References: <20261110-netcons_selftest_fix-v1-1-86643b837216@debian.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360818-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] selftests: netconsole: enable the targets created by
 the torture test
Date: Wed, 11 Nov 2026 09:58:32 +0800
Organization: Usenet Network
Message-ID: <avPLyMTFkhCRqRAS@fedora>
References: <20261110-netcons_selftest_fix-v1-1-86643b837216@debian.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="753884"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:NacymmQw35Z+RXSTJK5R4abNOVo= sha256:3l+TJY3HIF3btJ3JMrTzUzy9Mfi/pFLHwzgNGIv6+Pc=
	sha1:CHdMcy4OWyUPiQZikRycqCktWUo= sha256:WxVpgA2Nd/aOjAdxJoOLAPbPlvROYgGl9iyNHnhKWgo=
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 4CE4F113E02; Wed, 11 Nov 2026 04:59:35 +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 cEGMUTAa-tqe;
	Wed, 11 Nov 2026 04:59:26 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-360818-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 91B16113BDD; Wed, 11 Nov 2026 04:59:16 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id BC67643602; Wed, 11 Nov 2026 01:58:49 +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=1794362329;
	b=3kfYLcjqY40zPIm4CVF2gq9LPUWghubzd+quHqLDTLDOoqE4fLZZnM3g2v8l3inDReFD
	 RrImbKFW0Uph7g/4VTbky2HSix+A9yzVC4A+6Ruv+WKk7LiYmlkk/S+ZcY61MA5BjnEoM
	 XVId+CWG6aUzowJ4jepCcJc8G0uQqOUyz7ZTUFeIB23gdSfYwjcuaJLkEv4DLKGAmnXAC
	 fFEWe2aZgGFt2hW45C9TApqkM/hwpf/Y+a09QuKN5KibtfvH+prGGj+dweIRU72eUP+YP
	 36/71h4dF4IaiGqwLp/3n1iOH6oTo1k0IuHIu0m1Bqvn24C/ilAKMzD2PGt0hnK4fyQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794362329;
	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=qklwpoi6qq8nTgE1PW1qeUUVEPXIPv2nahyGGJhDRsw=;
	b=cAHWbXwPWL1AcUDE/pRZbUe11YXsP/KHiwrKd2Rq6CAKibUp0iwqzeiVeimYzrL4JqcA
	 HIexT492RbbW/xoLpZgzUg8iolNH3EIi9lF1uF9eArIxo6OnEYzdCfx7DDKCSuPz9hyiL
	 2MXSvmVLxZVO2H2fsgVgdO13CqaTtx8jTq4VA2+qXI0Nvhwc7WXm1/pihBR1XSpYm31hb
	 lTYLt8c50eFVFatf62pWW0fXxSeFqopTPNb0NhutzT3S95IkPJs5OtLfrjR0pAofQrFw+
	 EN5elvIY7xJcA95k2HRw7t8cJ+ZGruzVyoEsoNH4CR1sFqf76UIyFiNNpEZAF8E2kzA==
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=UTTBV+EI;
	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 2C7A4606A33A;
	Wed, 11 Nov 2026 01:58:49 +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=UTTBV+EI
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.205
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794362328;
	b=SMjOmVm3qZWc1EjAenlWMcWdPPj+x4yToBchqBQvUexbuoCXvrdU2cbkjlV/4ypOMXZa
	 Xtlsmc0bz+70cF/ri4EseTvGaT2CbuOdDPLS+tf15Xa2+jKi1UQylToO+g6LDHC15NHIH
	 Q8AXcxs9va2Llbq1UCccv+TEqu3WUNBxXQesKggF5L2DVpt70uDnlxBKVIbeYwLOJ0/5F
	 pduRr2ekKGTTgP2oJ5+nghwwBpXZ+TskdL1WKB6v537m2whO+JWdlFLpGfNxPF1pteP0A
	 Awe4VSNyLMrQ/bJV1U0UfAw2G/ZpgKySOZjn0ad6TNrwcUMoucQa38GCHm0hKq2JpNA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794362328;
	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=qklwpoi6qq8nTgE1PW1qeUUVEPXIPv2nahyGGJhDRsw=;
	b=jw85k4C5MV2OADv3COciAJO6VgQ+ivhH/FLU0gBowoll9swskIzDmc4cI03B5lIfzJxR
	 Z8fqipkzGrMWD3bqXq2P7mAAUpcfTMNO6GfN/rc/bv59j1/2C08T/H4TgUDyLdYEQyZDa
	 1RUVzB6dUU7AVvR6kHaqWxXRi7KIWoXwIuBlZedZN4BNKVb8LyIWf9E5HYia4hme9rFKX
	 x5qHWUYMCwv/mSwopv82Z0NMDuGgTtVECEhYd0pZoyYslQic+DSsIRf2s2idL4bs3PaGw
	 V5mkpPyK8ALSfUzJEXMxwpsS7YTk8AcPk4gX9TLiNglxMWlWhyhAQwhTzAp1nZuhIzA==
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=UTTBV+EI;
	arc=none smtp.remote-ip=95.215.58.205
X-Received: from mta1.migadu.com (out-205.mta1.migadu.com [95.215.58.205])
	(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 715CC606A324
	for <netdev@vger.kernel.org>; Wed, 11 Nov 2026 01:58:46 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 715CC606A324
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=kn3s5jPUjfCWATljI2U5Ha05zn+bxfjQnlH9S4hueak=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1794362324; v=1; x=1794967124;
 b=UTTBV+EIoTyq6szgGRQsYYKgNK9FTPxsWWKuqE1liETgQIf0h7nR4tcV+jiXm477q4sEfpP+
 7AcnZZ5qRT5xbvaxPz8K+mByDAwKJFjXiE3nC6wBfmO4Vzj96zpMu5ZVJ5dwcyE8Qx1iCULWzka
 4uzTSxt1ifYFJ8BvMRjGc9Ck=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta10.migadu.com with ESMTPS id 31c899d3efa8a9fc;
	Wed, 11 Nov 2026 01:58:44 +0000
X-Mizu-Trace-ID: 31c899d3efa8a9fc
X-Migadu-Flow: FLOW_OUT
X-Cc: Gustavo Luiz Duarte <gustavold@gmail.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shuah Khan <shuah@kernel.org>, Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-team@meta.com
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: <20261110-netcons_selftest_fix-v1-1-86643b837216@debian.org>