selftests: netfilter: skip tests on early errors
authorFlorian Westphal <fw@strlen.de>
Tue, 23 Apr 2024 13:05:49 +0000 (15:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Apr 2024 00:12:45 +0000 (17:12 -0700)
commitbb0ee78f9418374e087485888af374cc932f63c8
treeb32d5ba9ada3af2907943c009dd1f9e88ef90f00
parenta18f284574ada9b5c77173683b13625df7fb33f2
selftests: netfilter: skip tests on early errors

br_netfilter: If we can't add the needed initial nftables ruleset skip the
test, kernel doesn't support a required feature.

rpath: run a subset of the tests if possible, but make sure we return
the skip return value so they are marked appropriately by the kselftest
framework.

nft_audit.sh: provide version information when skipping, this should
help catching kernel problem (feature not available in kernel) vs.
userspace issue (parser doesn't support keyword).

Signed-off-by: Florian Westphal <fw@strlen.de>
Link: https://lore.kernel.org/r/20240423130604.7013-7-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/netfilter/br_netfilter.sh
tools/testing/selftests/net/netfilter/nft_audit.sh
tools/testing/selftests/net/netfilter/rpath.sh