selftests/bpf: Fix bpf_nf selftest failure
authorSaket Kumar Bhaskar <skb99@linux.ibm.com>
Wed, 9 Apr 2025 09:56:33 +0000 (15:26 +0530)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 9 Apr 2025 23:29:39 +0000 (16:29 -0700)
commit967e8def1100cb4b08c28a54d27ce69563fdf281
tree0ed137f18ad5c073c0cd727349a1fdda085a17eb
parenta76116f422c442ab691b4dcabb25613486d34360
selftests/bpf: Fix bpf_nf selftest failure

For systems with missing iptables-legacy tool this selftest fails.

Add check to find if iptables-legacy tool is available and skip the
test if the tool is missing.

Fixes: de9c8d848d90 ("selftests/bpf: S/iptables/iptables-legacy/ in the bpf_nf and xdp_synproxy test")
Signed-off-by: Saket Kumar Bhaskar <skb99@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250409095633.33653-1-skb99@linux.ibm.com
tools/testing/selftests/bpf/prog_tests/bpf_nf.c