Re: [PATCH bpf-next] selftests/bpf: Use ping_command() for IPv6 pings in lwt_ip_encap

Song Liu <[email protected]>
Newsgroups org.kernel.vger.bpf
Message-ID <CAAeYb7=dJ5XzNJWdSUr33z2XKF2SgEyGACFC0+LDy9PkD2LZLA@mail.gmail.com>
On Thu, Aug 13, 2026 at 2:36 PM 'Andrii Nakryiko' via Kernel Team
<[email protected]> wrote:
>
> lwt_ip_encap hardcodes the ping6 binary for its IPv6 pings. iputils
> merged ping6 into ping long ago and distros have started dropping the
> compat symlink -- Arch's iputils 20250605 ships only arping, clockdiff,
> ping and tracepath. There, every lwt_ip_encap subtest fails:
>
>   check_ping_ok:FAIL:ip netns exec ns-lwt-ip-encap-1-0101330 ping6 -c 1 \
>     -W1 -I veth1 fb04::1 > /dev/null unexpected error: 256 (errno 2)
>   #217/1   lwt_ip_encap_ipv4/egress:FAIL
>
> The IPv4 subtests fail too, because check_ping_ok() pings both families.
> SYS() runs the command through system(), so a missing binary is
> indistinguishable from an unreachable peer.
>
> network_helpers.c has had ping_command() for exactly this since commit
> 372642ea83ff ("selftests/bpf: Move netcnt test under test_progs"): it
> falls back to "ping -6" when ping6 is not present. lwt_ip_encap.c is the
> last hardcoded ping6 user. Fix that.
>
> Fixes: f5e288943e2c ("selftests/bpf: Move test_lwt_ip_encap to test_progs")
> Signed-off-by: Andrii Nakryiko <[email protected]>

Acked-by: Song Liu <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.