netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Andre Carvalho <asantostc@gmail.com>
Cc: Breno Leitao <leitao@debian.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] selftests: netconsole: remove log noise due to socat exit
Date: Sun, 30 Nov 2025 16:40:42 +0000	[thread overview]
Message-ID: <aSxziiGia10e5Stm@horms.kernel.org> (raw)
In-Reply-To: <20251129-netcons-socat-noise-v1-1-605a0cea8fca@gmail.com>

On Sat, Nov 29, 2025 at 12:24:19PM +0000, Andre Carvalho wrote:
> This removes some noise that can be distracting while looking at
> selftests by redirecting socat stderr to /dev/null.
> 
> Before this commit, netcons_basic would output:
> 
> Running with target mode: basic (ipv6)
> 2025/11/29 12:08:03 socat[259] W exiting on signal 15
> 2025/11/29 12:08:03 socat[271] W exiting on signal 15
> basic : ipv6 : Test passed
> Running with target mode: basic (ipv4)
> 2025/11/29 12:08:05 socat[329] W exiting on signal 15
> 2025/11/29 12:08:05 socat[322] W exiting on signal 15
> basic : ipv4 : Test passed
> Running with target mode: extended (ipv6)
> 2025/11/29 12:08:08 socat[386] W exiting on signal 15
> 2025/11/29 12:08:08 socat[386] W exiting on signal 15
> 2025/11/29 12:08:08 socat[380] W exiting on signal 15
> extended : ipv6 : Test passed
> Running with target mode: extended (ipv4)
> 2025/11/29 12:08:10 socat[440] W exiting on signal 15
> 2025/11/29 12:08:10 socat[435] W exiting on signal 15
> 2025/11/29 12:08:10 socat[435] W exiting on signal 15
> extended : ipv4 : Test passed
> 
> After these changes, output looks like:
> 
> Running with target mode: basic (ipv6)
> basic : ipv6 : Test passed
> Running with target mode: basic (ipv4)
> basic : ipv4 : Test passed
> Running with target mode: extended (ipv6)
> extended : ipv6 : Test passed
> Running with target mode: extended (ipv4)
> extended : ipv4 : Test passed
> 
> Signed-off-by: Andre Carvalho <asantostc@gmail.com>
> ---
>  tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh b/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
> index 87f89fd92f8c..ae8abff4be40 100644
> --- a/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
> +++ b/tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
> @@ -249,7 +249,7 @@ function listen_port_and_save_to() {
>  
>  	# Just wait for 2 seconds
>  	timeout 2 ip netns exec "${NAMESPACE}" \
> -		socat "${SOCAT_MODE}":"${PORT}",fork "${OUTPUT}"
> +		socat "${SOCAT_MODE}":"${PORT}",fork "${OUTPUT}" 2> /dev/null
>  }
>  
>  # Only validate that the message arrived properly

I'm always concerned that a blanket redirect might hide some corner
cases in the future. But I do agree that this addresses the issue
at hand. And probably I'm over-thinking things here.

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2025-11-30 16:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-29 12:24 [PATCH net-next] selftests: netconsole: remove log noise due to socat exit Andre Carvalho
2025-11-30 16:40 ` Simon Horman [this message]
2025-12-01 21:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aSxziiGia10e5Stm@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=asantostc@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).