]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add exponential backoff to map_delete_retriable in test_maps
authorYucong Sun <fallentree@fb.com>
Tue, 17 Aug 2021 04:57:13 +0000 (21:57 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 17 Aug 2021 15:17:40 +0000 (08:17 -0700)
commit342905a06599f1aa951a22f01f1bc8e56eeb0fb7
treef4804f3ab8c1872f8ac67950fd4e49b5332e5fbb
parent7c320bb00b5a22b76e71729f39b7099dc70ad667
selftests/bpf: Add exponential backoff to map_delete_retriable in test_maps

Using a fixed delay of 1 microsecond has proven flaky in slow CPU environment,
e.g. Github Actions CI system. This patch adds exponential backoff with a cap
of 50ms to reduce the flakiness of the test. Initial delay is chosen at random
in the range [0ms, 5ms).

Signed-off-by: Yucong Sun <fallentree@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210817045713.3307985-1-fallentree@fb.com
tools/testing/selftests/bpf/test_maps.c