]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: test_sockmap, timing improvements
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Thu, 31 May 2018 04:42:38 +0000 (13:42 +0900)
committerDaniel Borkmann <daniel@iogearbox.net>
Sat, 2 Jun 2018 04:13:56 +0000 (06:13 +0200)
commit209f09fcd37b0ee6ce948418a9e8302f266a9588
tree789c1813757218f053d02835801b875ba85b5c01
parent4bab66312a3060cc6f94ad78b10f658e79c1a17b
selftests/bpf: test_sockmap, timing improvements

Currently 10us delay is too low for many tests to succeed. It needs to
be increased. Also, many corked tests are expected to hit rx timeout
irrespective of timeout value.

- This patch sets 1000usec timeout value for corked tests because less
than that causes broken-pipe error in tx thread. Also sets 1 second
timeout for all other tests because less than that results in RX
timeout
- tests with apply=1 and higher number of iterations were taking lot
of time. This patch reduces test run time by reducing iterations.

real    0m12.968s
user    0m0.219s
sys     0m14.337s

Fixes: 45f5f806a0fd ("bpf: reduce runtime of test_sockmap tests")
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