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) <matt…@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) <matt…@kernel.org>
[PATCH net] selftests: net: nl_genl_mcast: unload drop_monitor if already loaded
- From
- matt…@kernel.org ("Matthieu Baerts (NGI0)")
- Organization
- Usenet Network
- Message-ID
- <2026…@kernel.org>
- Date
- Newsgroups
- linux.kernel.netdev