From: Aaron Conole <aconole@redhat.com>
To: netdev@vger.kernel.org
Cc: dev@openvswitch.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, "Pravin B Shelar" <pshelar@ovn.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Shuah Khan" <shuah@kernel.org>,
"Adrián Moreno" <amorenoz@redhat.com>,
"Simon Horman" <horms@kernel.org>
Subject: [PATCH net-next 2/3] selftests: openvswitch: Attempt to autoload module.
Date: Tue, 2 Jul 2024 09:28:29 -0400 [thread overview]
Message-ID: <20240702132830.213384-3-aconole@redhat.com> (raw)
In-Reply-To: <20240702132830.213384-1-aconole@redhat.com>
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: Aaron Conole <aconole@redhat.com>
---
.../selftests/net/openvswitch/openvswitch.sh | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh
index 15bca0708717..0bd0425848d9 100755
--- a/tools/testing/selftests/net/openvswitch/openvswitch.sh
+++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh
@@ -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
--
2.45.1
next prev parent reply other threads:[~2024-07-02 13:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 13:28 [PATCH net-next 0/3] selftests: openvswitch: Address some flakes in the CI environment Aaron Conole
2024-07-02 13:28 ` [PATCH net-next 1/3] selftests: openvswitch: Bump timeout to 15 minutes Aaron Conole
2024-07-03 16:55 ` Simon Horman
2024-07-02 13:28 ` Aaron Conole [this message]
2024-07-03 16:55 ` [PATCH net-next 2/3] selftests: openvswitch: Attempt to autoload module Simon Horman
2024-07-02 13:28 ` [PATCH net-next 3/3] selftests: openvswitch: Be more verbose with selftest debugging Aaron Conole
2024-07-03 16:55 ` Simon Horman
2024-07-04 2:40 ` [PATCH net-next 0/3] selftests: openvswitch: Address some flakes in the CI environment patchwork-bot+netdevbpf
2024-07-05 13:28 ` Jakub Kicinski
2024-07-05 13:49 ` Aaron Conole
2024-07-05 13:53 ` Jakub Kicinski
2024-07-05 14:01 ` Adrián Moreno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240702132830.213384-3-aconole@redhat.com \
--to=aconole@redhat.com \
--cc=amorenoz@redhat.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pshelar@ovn.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).