]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Guarantee that useep() calls nanosleep() syscall
authorAndrii Nakryiko <andriin@fb.com>
Wed, 11 Mar 2020 18:53:45 +0000 (11:53 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 13 Mar 2020 19:49:51 +0000 (12:49 -0700)
commita07f448af64586e8438ca86fd5ec662f9357485d
treedacdbf2b57b6865afe3f14591fe5c8b7d6f7ae42
parent77ee6e9f764afb6ec385bcf6595e01b58b75d52c
selftests/bpf: Guarantee that useep() calls nanosleep() syscall

Some implementations of C runtime library won't call nanosleep() syscall from
usleep(). But a bunch of kprobe/tracepoint selftests rely on nanosleep being
called to trigger them. To make this more reliable, "override" usleep
implementation and call nanosleep explicitly.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Cc: Julia Kartseva <hex@fb.com>
Link: https://lore.kernel.org/bpf/20200311185345.3874602-1-andriin@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_progs.c