From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
Anil Kaushik <anilkaushikwireless@gmail.com>,
Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
"Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Subject: [PATCH net] selftests: net: nl_genl_mcast: unload drop_monitor if already loaded
Date: Wed, 02 Dec 2026 16:41:24 +0100 [thread overview]
Message-ID: <20261202-net-genetlink-sft-skip-v1-1-87cb0f64d522@kernel.org> (raw)
The bind_before_family subtest is skipped when the NET_DM family is
already registered.
On the netdev CI, this happens each time nl_genl_mcast.py is executed
from the same VM after drop_monitor_tests.sh, which loads the
drop_monitor module via dwdump, and does not unload it.
Instead of skipping, try to unload drop_monitor first, and only skip if
NET_DM is still registered after that, e.g. when it is built-in or in
use. The subtest already unloads the module at the end.
Fixes: aa98cde56c48 ("selftests: net: test joining genetlink groups no family owns")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Note: drop_monitor_tests.sh could also unload the drop_monitor module at
the end, unless it was loaded before, but that is net-next material.
Here, only the issue causing troubles on NIPA is fixed.
---
tools/testing/selftests/net/nl_genl_mcast.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/net/nl_genl_mcast.py b/tools/testing/selftests/net/nl_genl_mcast.py
index 32b4951f8816..b245a0088cff 100755
--- a/tools/testing/selftests/net/nl_genl_mcast.py
+++ b/tools/testing/selftests/net/nl_genl_mcast.py
@@ -102,9 +102,15 @@ def _unload_drop_monitor():
def bind_before_family(ctrl) -> None:
"""A free ID joined with bind() stays unjoined when a family takes it."""
- names = [fam['family-name'] for fam in ctrl.getfamily({}, dump=True)]
- if 'NET_DM' in names:
- raise KsftSkipEx("NET_DM is already registered")
+ def _registered():
+ return any(fam['family-name'] == 'NET_DM'
+ for fam in ctrl.getfamily({}, dump=True))
+
+ if _registered():
+ # Likely loaded by another test, e.g. drop_monitor_tests.sh
+ _unload_drop_monitor()
+ if _registered():
+ raise KsftSkipEx("NET_DM is registered and cannot be unloaded")
free = _free_ids(ctrl)
with _sock() as sk:
---
base-commit: 7c13d5d5afb4ba2e8634fe5aa0a9f2bca235cb4b
change-id: 20261202-net-genetlink-sft-skip-271d9b340608
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>
next reply other threads:[~2026-12-02 15:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 15:41 Matthieu Baerts (NGI0) [this message]
2026-12-03 9:07 ` [PATCH net] selftests: net: nl_genl_mcast: unload drop_monitor if already loaded Nicolas Dichtel
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=20261202-net-genetlink-sft-skip-v1-1-87cb0f64d522@kernel.org \
--to=matttbe@kernel.org \
--cc=anilkaushikwireless@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=willemb@google.com \
/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