seccomp: add a selftest for get_metadata
authorTycho Andersen <tycho@tycho.ws>
Wed, 21 Feb 2018 02:47:47 +0000 (19:47 -0700)
committerKees Cook <keescook@chromium.org>
Thu, 22 Feb 2018 00:56:03 +0000 (16:56 -0800)
commitd057dc4e35e16050befa3dda943876dab39cbf80
treea283c0c7e3bffb81a32bc061c21fb1c0fc80e0f1
parent63bb0045b98ae821e56e27c2250e14bb0ae663e5
seccomp: add a selftest for get_metadata

Let's test that we get the flags correctly, and that we preserve the filter
index across the ptrace(PTRACE_SECCOMP_GET_METADATA) correctly.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
CC: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
tools/testing/selftests/seccomp/seccomp_bpf.c