]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: ovpn: serialize YNL listener startup
authorRalf Lici <ralf@mandelbit.com>
Thu, 16 Apr 2026 07:19:28 +0000 (09:19 +0200)
committerAntonio Quartulli <antonio@openvpn.net>
Fri, 17 Apr 2026 08:54:04 +0000 (10:54 +0200)
Starting one background YNL notification listener per peer back-to-back
can intermittently stall the test setup before the listeners even reach
the Python main function.

This was reproducible in a reduced test.sh setup-only loop: a single
listener stayed stable across repeated runs, while starting listeners
for all peers could hang early in the listener launch phase. Adding a
short delay between listener launches makes the listeners start cleanly
and eliminates the reproduced hangs in repeated normal and slow-runner
tests.

Serialize listener startup with a small sleep between setup_listener
calls.

Fixes: 77de28cd7cf1 ("selftests: ovpn: add notification parsing and matching")
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
tools/testing/selftests/net/ovpn/test.sh

index eca653112aeb6d7d7156166247cc2f8ad8b23ed1..b50dbe45a4d00a2fce5e89c4522e3f3b2e113319 100755 (executable)
@@ -31,6 +31,9 @@ ovpn_prepare_network() {
        for p in $(seq 0 ${OVPN_NUM_PEERS}); do
                ovpn_cmd_ok "start notification listener peer${p}" \
                        ovpn_setup_listener "${p}"
+               # starting all YNL listeners back-to-back can intermittently
+               # stall their startup so serialize launches a bit
+               sleep 0.5
        done
 
        for p in $(seq 0 ${OVPN_NUM_PEERS}); do