]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests: drv-net: Wait for bkg socat to start
authorMohsin Bashir <mohsin.bashr@gmail.com>
Thu, 24 Jul 2025 23:51:40 +0000 (16:51 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 25 Jul 2025 23:57:28 +0000 (16:57 -0700)
commitd1f3dbad6f0dbac6266c6b6b450af2aefde8481f
tree5a09bb07386ba2c80aaf36c6a442c16bbb396912
parent8020ca54a87733c03a14c937fc4f175db2484185
selftests: drv-net: Wait for bkg socat to start

Currently, UDP exchange is prone to failure when cmd attempt to send data
while socat in bkg is not ready. Since, the behavior is probabilistic, this
can result in flakiness for XDP tests. While testing
test_xdp_native_tx_mb() on netdevsim, a failure rate of around 1% in 500
500 iterations was observed.

Use wait_port_listen() to ensure that the bkg socat is started and ready to
receive before cmd start sending. With proposed changes, a re-run of the
same test passed 100% of time.

Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
Link: https://patch.msgid.link/20250724235140.2645885-1-mohsin.bashr@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/xdp.py