Netdev List
 help / color / mirror / Atom feed
From: "Íñigo Huguet" <ihuguet@riseup.net>
To: Jakub Kicinski <kuba@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>
Cc: "Sabrina Dubroca" <sd@queasysnail.net>,
	"Filip Pokryvka" <fpokryvk@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	"Íñigo Huguet" <ihuguet@riseup.net>
Subject: [PATCH net-next 5/5] selftest: netdevsim: suppress socat warnings
Date: Sun, 10 May 2026 18:43:37 +0200	[thread overview]
Message-ID: <20260510164337.7611-6-ihuguet@riseup.net> (raw)
In-Reply-To: <20260510164337.7611-1-ihuguet@riseup.net>

When executing the peer.sh selftest, socat emits these 2 warnings:
  socat[116839] W address is opened in read-write mode but only supports read-only
  socat[116833] W exiting on signal 15

The first one is because socat tries to open in read-write mode by
default, but STDIN can only be opened in read mode. Fix it by adding the
-u option (unidirectional left-to-right).

The second is because 'kill' is used to terminate the first socat process.
Suppress this warning by redirecting its stderr to /dev/null

Signed-off-by: Íñigo Huguet <ihuguet@riseup.net>
---
 tools/testing/selftests/drivers/net/netdevsim/peer.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/drivers/net/netdevsim/peer.sh b/tools/testing/selftests/drivers/net/netdevsim/peer.sh
index ec96015bc9eb..183a130c6e4b 100755
--- a/tools/testing/selftests/drivers/net/netdevsim/peer.sh
+++ b/tools/testing/selftests/drivers/net/netdevsim/peer.sh
@@ -210,13 +210,13 @@ assert_carrier_up nscl "$NSIM_DEV_2_NAME"
 # send/recv packets
 
 tmp_file=$(mktemp)
-ip netns exec nssv socat TCP-LISTEN:1234,fork $tmp_file &
+ip netns exec nssv socat TCP-LISTEN:1234,fork $tmp_file 2>/dev/null &
 pid=$!
 res=0
 
 wait_local_port_listen nssv 1234 tcp
 
-echo "HI" | ip netns exec nscl socat STDIN TCP:192.168.1.1:1234
+echo "HI" | ip netns exec nscl socat -u STDIN TCP:192.168.1.1:1234
 
 count=$(cat $tmp_file | wc -c)
 if [[ $count -ne 3 ]]; then
-- 
2.53.0


  parent reply	other threads:[~2026-05-10 16:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-10 16:43 [PATCH net-next 0/5] netdevsim: get link via ethtool, set via sysfs Íñigo Huguet
2026-05-10 16:43 ` [PATCH net-next 1/5] netdevsim: Add ethtool get_link support Íñigo Huguet
2026-05-10 16:43 ` [PATCH net-next 2/5] netdevsim: allow changing carrier state via sysfs Íñigo Huguet
2026-05-10 16:43 ` [PATCH net-next 3/5] selftest: netdevsim: test carrier change " Íñigo Huguet
2026-05-10 16:43 ` [PATCH net-next 4/5] selftest: netdevsim: cleanup the devices and module on failure Íñigo Huguet
2026-05-10 16:43 ` Íñigo Huguet [this message]
2026-05-10 16:52 ` [PATCH net-next 0/5] netdevsim: get link via ethtool, set via sysfs Jakub Kicinski
2026-05-11  9:50   ` Íñigo Huguet
2026-05-11 23:59     ` Jakub Kicinski

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=20260510164337.7611-6-ihuguet@riseup.net \
    --to=ihuguet@riseup.net \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fpokryvk@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    --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