selftests/net: synchronize udpgro tests' tx and rx connection
authorLucas Karpinski <lkarpins@redhat.com>
Tue, 14 Nov 2023 15:11:31 +0000 (10:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Nov 2023 22:31:56 +0000 (22:31 +0000)
commit3bdd9fd29cb0f136b307559a19c107210ad5c314
tree5ff5536915be13ff000f8e46ff42b0088ea45885
parente47ef9eb5bb8fdc9fafa5eaf82be7a922af89b1e
selftests/net: synchronize udpgro tests' tx and rx connection

The sockets used by udpgso_bench_tx aren't always ready when
udpgso_bench_tx transmits packets. This issue is more prevalent in -rt
kernels, but can occur in both. Replace the hacky sleep calls with a
function that checks whether the ports in the namespace are ready for
use.

Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Lucas Karpinski <lkarpins@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/net_helper.sh [new file with mode: 0755]
tools/testing/selftests/net/udpgro.sh
tools/testing/selftests/net/udpgro_bench.sh
tools/testing/selftests/net/udpgro_frglist.sh