selftests: xsk: add timeout to tests
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 10 May 2022 11:56:00 +0000 (13:56 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 11 May 2022 15:03:15 +0000 (08:03 -0700)
commitdb1bd7a99454db5d9003ddcd64e771e265170f5b
tree61933fc029c1e486b0b586fab567049eb776f039
parent895b62eed2ab48c314653bcf3459521b42f9db4e
selftests: xsk: add timeout to tests

Add a timeout to the tests so that if all packets have not been
received within 3 seconds, fail the ongoing test. Hinders a test from
dead-locking if there is something wrong.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20220510115604.8717-6-magnus.karlsson@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/xdpxceiver.c
tools/testing/selftests/bpf/xdpxceiver.h