]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: retry tests that expect build-id
authorStanislav Fomichev <sdf@google.com>
Wed, 16 Jan 2019 22:03:17 +0000 (14:03 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 17 Jan 2019 15:43:18 +0000 (16:43 +0100)
commit80b9adaae8970a55262e1010ea9fed6c5655a979
tree051b55414a98c357d5e0e948f8fc9d55e3acd095
parent68a38d675e8c50180987e105bfb067560d36fb4e
selftests/bpf: retry tests that expect build-id

While running test_progs in a loop I found out that I'm sometimes hitting
"Didn't find expected build ID from the map" error.

Looking at stack_map_get_build_id_offset() it seems that it is racy (by
design) and can sometimes return BPF_STACK_BUILD_ID_IP (i.e. can't trylock
current->mm->mmap_sem).

Let's retry this test a single time.

Fixes: 75d595974d8a ("bpf: add selftest for stackmap with build_id in NMI context")
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_progs.c