Thread (8 messages) flat view 8 messages, 2 authors, 2026-01-21
STALE240d

[PATCH 4/6] selftests: forwarding: tc_flower_cfm: skip tests if tools or feats are missing

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

The tc_flower_cfm.sh selftest assume the presence of iproute2
support for the `cfm` keyword in `tc filter` commands. These
assumptions can cause test failures.

This patch improves test robustness by skipping the test if
tc filter help does not mention CFM

Signed-off-by: Aleksei Oladko <redacted>
---
 tools/testing/selftests/net/forwarding/tc_flower_cfm.sh | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/tc_flower_cfm.sh b/tools/testing/selftests/net/forwarding/tc_flower_cfm.sh
index 3ca20df952eb..65f95fe88b38 100755
--- a/tools/testing/selftests/net/forwarding/tc_flower_cfm.sh
+++ b/tools/testing/selftests/net/forwarding/tc_flower_cfm.sh
@@ -196,6 +196,8 @@ cleanup()
 	vrf_cleanup
 }
 
+run_cmd_grep 'CFM' tc filter add dev lo ingress flower help || exit $ksft_skip
+
 trap cleanup EXIT
 
 setup_prepare
-- 
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