mbox series

[net,0/2] selftests: Fix udpgro failures

Message ID 20240814075758.163065-1-liuhangbin@gmail.com
Headers show
Series selftests: Fix udpgro failures | expand

Message

Hangbin Liu Aug. 14, 2024, 7:57 a.m. UTC
There are 2 issues for the current udpgro test. The first one is the testing
doesn't record all the failures, which may report pass but the test actually
failed. e.g.
https://netdev-3.bots.linux.dev/vmksft-net/results/725661/45-udpgro-sh/stdout

The other one is after commit d7db7775ea2e ("net: veth: do not manipulate
GRO when using XDP"), there is no need to load xdp program to enable GRO
on veth device.

Hangbin Liu (2):
  selftests: udpgro: report error when receive failed
  selftests: udpgro: no need to load xdp for gro

 tools/testing/selftests/net/udpgro.sh | 50 +++++++++++++--------------
 1 file changed, 25 insertions(+), 25 deletions(-)

Comments

Hangbin Liu Aug. 14, 2024, 2:20 p.m. UTC | #1
On Wed, Aug 14, 2024 at 12:19:22PM +0200, Paolo Abeni wrote:
> > --- 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?

No, only the failed test echo "failed". The passed tests still
report "ok". The "check_err $?" in run_all function only record none 0
ret as return value.

Thanks
Hangbin