selftests/seccomp: Actually sleep for 1/10th second
authorKees Cook <keescook@chromium.org>
Sun, 27 Jan 2019 09:43:57 +0000 (01:43 -0800)
committerShuah Khan <shuah@kernel.org>
Wed, 13 Feb 2019 15:52:42 +0000 (08:52 -0700)
commited492c2ad46450791c80f5e260f48d36e3a044eb
tree08c1c7c9547999d21eb9f458a9a3466f4219c793
parent121e357ac72836662cc13598d0e835fe846f1c95
selftests/seccomp: Actually sleep for 1/10th second

Clang noticed that some none-zero sleep()s were actually using zero
anyway. This switches to nanosleep() to gain sub-second granularity.

seccomp_bpf.c:2625:9: warning: implicit conversion from 'double' to
      'unsigned int' changes value from 0.1 to 0 [-Wliteral-conversion]
                sleep(0.1);
                ~~~~~ ^~~

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Shuah Khan <shuah@kernel.org>
tools/testing/selftests/seccomp/seccomp_bpf.c