selftests/bpf: test_sockmap, check test failure
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Thu, 31 May 2018 04:42:36 +0000 (13:42 +0900)
committerDaniel Borkmann <daniel@iogearbox.net>
Sat, 2 Jun 2018 04:13:56 +0000 (06:13 +0200)
commit16edddfe3c5d192f097c27ff60cae05daa29f782
tree40d6b5bacec67b7236b606645c1fe7d7abb90c9f
parentbcece5dc40b9e00d0a9a91fc0acc9a825c23362b
selftests/bpf: test_sockmap, check test failure

Test failures are not identified because exit code of RX/TX threads
is not checked. Also threads are not returning correct exit code.

- Return exit code from threads depending on test execution status
- In main thread, check the exit code of RX/TX threads
- Skip error checking for corked tests as they are expected to timeout

Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_sockmap.c