]> asedeno.scripts.mit.edu Git - linux.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)
commitf67ad87ab3120e82845521b18a2b99273a340308
tree051b55414a98c357d5e0e948f8fc9d55e3acd095
parent4af396ae4836c4ecab61e975b8e61270c551894d
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: 13790d1cc72c ("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