tests: fix cond_broadcast/wait race

It is possible for the second sibling to lose the race for the mutex
and miss one of the two cond_broadcast events. Detect this, and lower
the num_waits manually when shutting down the sibling.

Signed-off-by: Kees Cook <keescook@chromium.org>
tests: make sure spawned process can report status

If the spawned tracer fails and tests, communicate that back to the
spawner so the test will be reported as failing at the top-level.

Signed-off-by: Kees Cook <keescook@chromium.org>
tests: make sure events are from SECCOMP

Makes sure that the PTRACE_EVENT_SECCOMP value is correct and that is
is being passed by the kernel on ptrace events.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1326905

Signed-off-by: Kees Cook <keescook@chromium.org>
test: run tests in source declaration order

Since the constructor was calling registration, the test list needed to be
explicitly built in reverse.

Signed-off-by: Kees Cook <keescook@chromium.org>
test: convert from ACT_EXT_TSYNC to syscall

Converts tests to use new seccomp syscall instead of prctl.

Signed-off-by: Kees Cook <keescook@chromium.org>