]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/net: make so_txtime more robust to timer variance
authorWillem de Bruijn <willemb@google.com>
Thu, 12 Dec 2019 16:36:46 +0000 (11:36 -0500)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 15 Dec 2019 02:03:01 +0000 (18:03 -0800)
commitb486d25a508d1313847b2e3bf9c1e1051eb92246
tree5d037aacd4e54cbe01f59e364671dab16d7e14f6
parent45f9471911a7efc12f729817d8c16ae73b8867e8
selftests/net: make so_txtime more robust to timer variance

The SO_TXTIME test depends on accurate timers. In some virtualized
environments the test has been reported to be flaky. This is easily
reproduced by disabling kvm acceleration in Qemu.

Allow greater variance in a run and retry to further reduce flakiness.

Observed errors are one of two kinds: either the packet arrives too
early or late at recv(), or it was dropped in the qdisc itself and the
recv() call times out.

In the latter case, the qdisc queues a notification to the error
queue of the send socket. Also explicitly report this cause.

Link: https://lore.kernel.org/netdev/CA+FuTSdYOnJCsGuj43xwV1jxvYsaoa_LzHQF9qMyhrkLrivxKw@mail.gmail.com
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
tools/testing/selftests/net/so_txtime.c
tools/testing/selftests/net/so_txtime.sh