From: Paolo Abeni <pabeni@redhat.com>
To: Hangbin Liu <liuhangbin@gmail.com>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Shuah Khan" <shuah@kernel.org>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Jesper Dangaard Brouer" <hawk@kernel.org>,
"John Fastabend" <john.fastabend@gmail.com>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Ignat Korchagin" <ignat@cloudflare.com>,
linux-kselftest@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH net 1/2] selftests: udpgro: report error when receive failed
Date: Wed, 14 Aug 2024 12:19:22 +0200 [thread overview]
Message-ID: <244ef3bd-2f2b-4820-9fe0-a10641c0829b@redhat.com> (raw)
In-Reply-To: <20240814075758.163065-2-liuhangbin@gmail.com>
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@redhat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.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
next prev parent reply other threads:[~2024-08-14 10:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 7:57 [PATCH net 0/2] selftests: Fix udpgro failures Hangbin Liu
2024-08-14 7:57 ` [PATCH net 1/2] selftests: udpgro: report error when receive failed Hangbin Liu
2024-08-14 10:19 ` Paolo Abeni [this message]
2024-08-14 14:20 ` Hangbin Liu
2024-08-14 14:17 ` Hangbin Liu
2024-08-14 7:57 ` [PATCH net 2/2] selftests: udpgro: no need to load xdp for gro Hangbin Liu
2024-08-14 10:19 ` Toke Høiland-Jørgensen
2024-08-14 10:20 ` Paolo Abeni
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=244ef3bd-2f2b-4820-9fe0-a10641c0829b@redhat.com \
--to=pabeni@redhat.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=ignat@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=toke@redhat.com \
/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