| 6c9b1dc2 | 16-Apr-2026 |
Ralf Lici <ralf@mandelbit.com> |
selftests: ovpn: serialize YNL listener startup
Starting one background YNL notification listener per peer back-to-back can intermittently stall the test setup before the listeners even reach the Py
selftests: ovpn: serialize YNL listener startup
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>
show more ...
|
| 1be93bb9 | 23-Mar-2026 |
Ralf Lici <ralf@mandelbit.com> |
selftests: ovpn: align command flow with TAP
Current tests do not properly adhere to the TAP infrastructure therefore they do not properly report failures leading to hangs of the CI machinery.
Rest
selftests: ovpn: align command flow with TAP
Current tests do not properly adhere to the TAP infrastructure therefore they do not properly report failures leading to hangs of the CI machinery.
Restructure ovpn selftests into using the TAP infrastructure: split each test in stages, execute stage bodies with fail-fast semantics, and emit KTAP pass/fail for each stage.
Centralize behavior control in common.sh and makes the scripts use dedicated wrappers for required-success, expected-failure, and non-fatal commands. Also add the OVPN_VERBOSE mode that exposes captured command output for debugging. This way tests won't hang anymore in case of failure when executed within the CI machinery.
This change also makes default OVPN_CLI and YNL resolution independent from the caller CWD by anchoring both to COMMON_DIR, so behavior is stable across direct execution and run_tests-style execution.
Fixes: 959bc330a439 ("testing/selftests: add test tool and scripts for ovpn module") Signed-off-by: Ralf Lici <ralf@mandelbit.com> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
show more ...
|
| 7c29665a | 20-Mar-2026 |
Ralf Lici <ralf@mandelbit.com> |
selftests: ovpn: add prefix to helpers and shared variables
Current naming for shared variables, helpers and netnamespaces is a bit unfortunate as it doesn't come with a clean prefix. This showed to
selftests: ovpn: add prefix to helpers and shared variables
Current naming for shared variables, helpers and netnamespaces is a bit unfortunate as it doesn't come with a clean prefix. This showed to be problematic in case of name clashes with external scripts or in case of abrupt test termination (hanging netns' weren't easily reconducible to ovpn).
Rename common helper entry points and all shared globals in the ovpn selftests to ovpn_ or OVPN_ names so test scripts and wrappers use a single explicit prefix. Also rename the temporary network namespaces created by the tests from peerN to ovpn_peerN. This makes leaked namespaces easier to identify.
This is a mechanical refactor only, behavior is unchanged.
Fixes: 959bc330a439 ("testing/selftests: add test tool and scripts for ovpn module") Signed-off-by: Ralf Lici <ralf@mandelbit.com> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
show more ...
|
| 222e7f8d | 24-Mar-2026 |
Ralf Lici <ralf@mandelbit.com> |
selftests: ovpn: flatten slurped notification JSON before filtering
Notification comparison uses jq -s, which slurps all inputs into an array. Some inputs can be arrays themselves, and applying the
selftests: ovpn: flatten slurped notification JSON before filtering
Notification comparison uses jq -s, which slurps all inputs into an array. Some inputs can be arrays themselves, and applying the .msg.peer filter directly on those entries triggers jq type errors.
Expand any array-valued JSON items returned by jq -s before selecting .msg.peer, so the filter handles both normal notification objects and [] entries without type errors.
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>
show more ...
|
| c409da0f | 23-Mar-2026 |
Ralf Lici <ralf@mandelbit.com> |
selftests: ovpn: fail notification check on mismatch
compare_ntfs doesn't fail when expected and received notification streams diverge.
Fix this bug by tracking the diff exit status explicitly and
selftests: ovpn: fail notification check on mismatch
compare_ntfs doesn't fail when expected and received notification streams diverge.
Fix this bug by tracking the diff exit status explicitly and return it to the caller so notification mismatches propagate as test failures.
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>
show more ...
|
| 7b80d8a3 | 19-Nov-2025 |
Ralf Lici <ralf@mandelbit.com> |
selftests: ovpn: add test for the FW mark feature
Add a selftest to verify that the FW mark socket option is correctly supported and its value propagated by ovpn.
The test adds and removes nftables
selftests: ovpn: add test for the FW mark feature
Add a selftest to verify that the FW mark socket option is correctly supported and its value propagated by ovpn.
The test adds and removes nftables DROP rules based on the mark value, and checks that the rule counter aligns with the number of lost ping packets.
Cc: Shuah Khan <shuah@kernel.org> Cc: linux-kselftest@vger.kernel.org Cc: horms@kernel.org Signed-off-by: Ralf Lici <ralf@mandelbit.com> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
show more ...
|
| 77de28cd | 13-Jun-2025 |
Ralf Lici <ralf@mandelbit.com> |
selftests: ovpn: add notification parsing and matching
To verify that netlink notifications are correctly emitted and contain the expected fields, this commit uses the tools/net/ynl/pyynl/cli.py scr
selftests: ovpn: add notification parsing and matching
To verify that netlink notifications are correctly emitted and contain the expected fields, this commit uses the tools/net/ynl/pyynl/cli.py script to create multicast listeners. These listeners record the captured notifications to a JSON file, which is later compared to the expected output.
Cc: linux-kselftest@vger.kernel.org Cc: shuah@kernel.org Cc: horms@kernel.org Signed-off-by: Ralf Lici <ralf@mandelbit.com> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
show more ...
|
| c841b676 | 14-Nov-2025 |
Ralf Lici <ralf@mandelbit.com> |
ovpn: notify userspace on client float event
Send a netlink notification when a client updates its remote UDP endpoint. The notification includes the new IP address, port, and scope ID (for IPv6).
ovpn: notify userspace on client float event
Send a netlink notification when a client updates its remote UDP endpoint. The notification includes the new IP address, port, and scope ID (for IPv6).
Cc: linux-kselftest@vger.kernel.org Cc: horms@kernel.org Cc: shuah@kernel.org Cc: donald.hunter@gmail.com Signed-off-by: Ralf Lici <ralf@mandelbit.com> Signed-off-by: Antonio Quartulli <antonio@openvpn.net> Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
show more ...
|
| 9c7e8b31 | 22-May-2025 |
Antonio Quartulli <antonio@openvpn.net> |
selftest/net/ovpn: fix missing file
test-large-mtu.sh is referenced by the Makefile but does not exist.
Add it along the other scripts.
Fixes: 944f8b6abab6 ("selftest/net/ovpn: extend coverage wit
selftest/net/ovpn: fix missing file
test-large-mtu.sh is referenced by the Makefile but does not exist.
Add it along the other scripts.
Fixes: 944f8b6abab6 ("selftest/net/ovpn: extend coverage with more test cases") Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
show more ...
|
| 944f8b6a | 06-May-2025 |
Antonio Quartulli <antonio@openvpn.net> |
selftest/net/ovpn: extend coverage with more test cases
To increase code coverage, extend the ovpn selftests with the following cases: * connect UDP peers using a mix of IPv6 and IPv4 at the transpo
selftest/net/ovpn: extend coverage with more test cases
To increase code coverage, extend the ovpn selftests with the following cases: * connect UDP peers using a mix of IPv6 and IPv4 at the transport layer * run full test with tunnel MTU equal to transport MTU (exercising IP layer fragmentation) * ping "LAN IP" served by VPN peer ("LAN behind a client" test case)
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
show more ...
|