selftests: don't kill child immediately in get_metadata() test
authorTycho Andersen <tycho@tycho.ws>
Sat, 19 Jan 2019 00:12:12 +0000 (17:12 -0700)
committerShuah Khan <shuah@kernel.org>
Wed, 13 Feb 2019 15:34:16 +0000 (08:34 -0700)
commitfb024a07c69f81e97f3fd252b9102f5816066884
treeaf1ac0dceeae819bcbd0a0572f86fa1d77945d7a
parentd13937116f1e82bf508a6325111b322c30c85eb9
selftests: don't kill child immediately in get_metadata() test

This this test forks a child, and then the parent waits for a write() to a
pipe signalling the child is ready to be attached to. If something in the
child ASSERTs before it does this write, the test will hang waiting for it.
Instead, let's EXPECT, so that execution continues until we do the write.
Any failure after that is fine and can ASSERT.

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