[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <244ef3bd-2f2b-4820-9fe0-a10641c0829b@redhat.com>
Date: Wed, 14 Aug 2024 12:19:22 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Hangbin Liu <liuhangbin@...il.com>, netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Shuah Khan <shuah@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Toke Høiland-Jørgensen <toke@...hat.com>,
Ignat Korchagin <ignat@...udflare.com>, linux-kselftest@...r.kernel.org,
bpf@...r.kernel.org
Subject: Re: [PATCH net 1/2] selftests: udpgro: report error when receive
failed
On 8/14/24 09:57, Hangbin Liu wrote:
> Currently, we only check the latest senders's exit code. If the receiver
> report failed, it is not recoreded. Fix it by checking the exit code
> of all the involved processes.
>
> Before:
> bad GRO lookup ok
> multiple GRO socks ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520
>
> ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520
>
> failed
> $ echo $?
> 0
>
> After:
> bad GRO lookup ok
> multiple GRO socks ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520
>
> ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520
>
> failed
> $ echo $?
> 1
>
> Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO")
> Suggested-by: Paolo Abeni <pabeni@...hat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> ---
> tools/testing/selftests/net/udpgro.sh | 41 ++++++++++++++++-----------
> 1 file changed, 24 insertions(+), 17 deletions(-)
>
> diff --git a/tools/testing/selftests/net/udpgro.sh b/tools/testing/selftests/net/udpgro.sh
> index 11a1ebda564f..7e0164247b83 100755
> --- a/tools/testing/selftests/net/udpgro.sh
> +++ b/tools/testing/selftests/net/udpgro.sh
> @@ -49,14 +49,15 @@ run_one() {
>
> cfg_veth
>
> - ip netns exec "${PEER_NS}" ./udpgso_bench_rx -C 1000 -R 10 ${rx_args} && \
> - echo "ok" || \
> - echo "failed" &
> + ip netns exec "${PEER_NS}" ./udpgso_bench_rx -C 1000 -R 10 ${rx_args} &
> + local PID1=$!
>
> wait_local_port_listen ${PEER_NS} 8000 udp
> ./udpgso_bench_tx ${tx_args}
> - ret=$?
> - wait $(jobs -p)
> + check_err $?
> + wait ${PID1}
> + check_err $?
> + [ "$ret" -eq 0 ] && echo "ok" || echo "failed"
I think that with the above, in case of a failure, every test after the
failing one will should fail, regardless of the actual results, am I
correct?
Thanks,
Paolo
Powered by blists - more mailing lists