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 <[email protected]> --- 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

