mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-14 01:34:43 +08:00
kselftests/bpf: use ping6 as the default ipv6 ping binary when it exists
At commitdeee2cae27
("kselftests/bpf: use ping6 as the default ipv6 ping binary if it exists"), it fixed similar issues for shell script, but it missed a same issue in the C code. Fixes:371e4fcc9d
("selftests/bpf: cgroup local storage-based network counters") Reported-by: kernel test robot <rong.a.chen@intel.com> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> CC: Philip Li <philip.li@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
f98e46a251
commit
da85d8bfd1
@ -81,7 +81,10 @@ int main(int argc, char **argv)
|
||||
goto err;
|
||||
}
|
||||
|
||||
assert(system("ping localhost -6 -c 10000 -f -q > /dev/null") == 0);
|
||||
if (system("which ping6 &>/dev/null") == 0)
|
||||
assert(!system("ping6 localhost -c 10000 -f -q > /dev/null"));
|
||||
else
|
||||
assert(!system("ping -6 localhost -c 10000 -f -q > /dev/null"));
|
||||
|
||||
if (bpf_prog_query(cgroup_fd, BPF_CGROUP_INET_EGRESS, 0, NULL, NULL,
|
||||
&prog_cnt)) {
|
||||
|
Loading…
Reference in New Issue
Block a user