Thread (8 messages) 8 messages, 2 authors, 2026-01-21
STALE182d

[PATCH 2/6] selftests: forwarding: sch_ets: skip test if cls_basic module is missing

From: Aleksei Oladko <hidden>
Date: 2026-01-20 23:02:34
Also in: linux-kselftest, lkml
Subsystem: kernel selftest framework, networking [general], networking [ipv4/ipv6], the rest · Maintainers: Shuah Khan, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern, Ido Schimmel, Linus Torvalds

The sch_ets.sh test requires the cls_basic kernel module to function
properly. If the kernel is compiled without CONFIG_NET_CLS_BASIC,
the test fails instead of being gracefully skipped.

Add a check to attempt loading the cls_basic module. If modprobe fails,
the test will be skipped.

Signed-off-by: Aleksei Oladko <redacted>
---
 tools/testing/selftests/net/forwarding/sch_ets_core.sh | 1 +
 1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/net/forwarding/sch_ets_core.sh b/tools/testing/selftests/net/forwarding/sch_ets_core.sh
index 0453210271dc..ff3ac3e43c33 100644
--- a/tools/testing/selftests/net/forwarding/sch_ets_core.sh
+++ b/tools/testing/selftests/net/forwarding/sch_ets_core.sh
@@ -98,6 +98,7 @@ classifier_mode()
 {
 	echo "Running in classifier mode"
 	ets_delete_qdisc
+	modprobe cls_basic || exit $ksft_skip
 	ETS_CHANGE_QDISC=ets_change_qdisc_classifier
 }
 
-- 
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help