mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-05 06:01:26 +02:00
selftests/bpf: Fix bpf_nf selftest failure
commit967e8def11upstream. 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:de9c8d848d("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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cc62578b65
commit
e7d4527085
@@ -63,6 +63,12 @@ static void test_bpf_nf_ct(int mode)
|
||||
.repeat = 1,
|
||||
);
|
||||
|
||||
if (SYS_NOFAIL("iptables-legacy --version")) {
|
||||
fprintf(stdout, "Missing required iptables-legacy tool\n");
|
||||
test__skip();
|
||||
return;
|
||||
}
|
||||
|
||||
skel = test_bpf_nf__open_and_load();
|
||||
if (!ASSERT_OK_PTR(skel, "test_bpf_nf__open_and_load"))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user