Commit 818481db authored by Aaron Conole's avatar Aaron Conole Committed by Jakub Kicinski

selftests: openvswitch: Attempt to autoload module.

Previously, the openvswitch.sh test suites would not attempt to autoload
the openvswitch module.  The idea was that a user who is manually running
tests might not even have the OVS module loaded or configured for their
own development.  However, if the kernel module is configured, and the
module can be autoloaded then we should just attempt to load it and run
the tests.  This is especially true in the CI environments, where the CI
tests should be able to rely on auto loading to get the test suite running.
Signed-off-by: default avatarAaron Conole <aconole@redhat.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Tested-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240702132830.213384-3-aconole@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent ff015706
......@@ -613,16 +613,20 @@ run_test() {
tname="$1"
tdesc="$2"
if ! lsmod | grep openvswitch >/dev/null 2>&1; then
stdbuf -o0 printf "TEST: %-60s [NOMOD]\n" "${tdesc}"
return $ksft_skip
fi
if python3 ovs-dpctl.py -h 2>&1 | \
grep -E "Need to (install|upgrade) the python" >/dev/null 2>&1; then
stdbuf -o0 printf "TEST: %-60s [PYLIB]\n" "${tdesc}"
return $ksft_skip
fi
python3 ovs-dpctl.py show >/dev/null 2>&1 || \
echo "[DPCTL] show exception."
if ! lsmod | grep openvswitch >/dev/null 2>&1; then
stdbuf -o0 printf "TEST: %-60s [NOMOD]\n" "${tdesc}"
return $ksft_skip
fi
printf "TEST: %-60s [START]\n" "${tname}"
unset IFS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment