[Devel] [PATCH RHEL10 COMMIT] selftests: net: l2tp: ensure required modules are loaded
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Aug 11 22:24:56 MSK 2026
The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.39.1.16.3.vz10
------>
commit 77604b60d0e87b5df9bfaa21fb4acf457fe65345
Author: Aleksei Oladko <aleksey.oladko at virtuozzo.com>
Date: Sun Jan 4 01:50:26 2026 +0000
selftests: net: l2tp: ensure required modules are loaded
The net kselftest l2tp.sh fails when the required l2tp kernel modules
are not loaded beforehand: the test aborts in setup(), which runs under
"set -e", and not a single testcase is executed:
# ./l2tp.sh
RTNETLINK answers: No such file or directory
Error talking to the kernel
The kernel does try to load the modules on demand, but
l2tp_netlink/l2tp_eth/l2tp_ip/l2tp_ip6 modules are blacklisted and
cannot be autoloaded.
See https://access.redhat.com/articles/3760101 for the rationale.
So load the required modules explicitly by name before running the
tests, and skip the test if they are not available.
Loading l2tp_eth and l2tp_ip6 is enough, module dependencies pull in
l2tp_netlink, l2tp_core and l2tp_ip.
With the modules loaded l2tp.sh passes all of its 16 testcases.
https://virtuozzo.atlassian.net/browse/VSTOR-121804
Feature: Fix selftests
Signed-off-by: Aleksei Oladko <aleksey.oladko at virtuozzo.com>
---
tools/testing/selftests/net/l2tp.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/net/l2tp.sh b/tools/testing/selftests/net/l2tp.sh
index 88de7166c8ae9..0927056b92689 100755
--- a/tools/testing/selftests/net/l2tp.sh
+++ b/tools/testing/selftests/net/l2tp.sh
@@ -369,6 +369,9 @@ do
esac
done
+modprobe l2tp_eth || exit $ksft_skip
+modprobe l2tp_ip6 || exit $ksft_skip
+
run_tests
cleanup
More information about the Devel
mailing list