seccomp: Adjust selftests to avoid double-join
authorKees Cook <keescook@chromium.org>
Mon, 20 Mar 2017 23:41:35 +0000 (16:41 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 26 Jun 2017 16:22:33 +0000 (09:22 -0700)
commit93bd70e3330be45542c455dde11d8dc657ab3044
treeecf3d715829d8c863d007eb57077346a11127ef5
parent131b63515932d18a3b1a60db3958f3c0dd5462bc
seccomp: Adjust selftests to avoid double-join

While glibc's pthread implementation is rather forgiving about repeat
thread joining, Bionic has recently become much more strict. To deal with
this, actually track which threads have been successfully joined and kill
the rest at teardown.

Based on a patch from Paul Lawrence.

Cc: Paul Lawrence <paullawrence@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
tools/testing/selftests/seccomp/seccomp_bpf.c