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 <aleksey.oladko@virtuozzo.com>
---
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