OSDN Git Service

selftests/harness: Move test child waiting logic
authorKees Cook <keescook@chromium.org>
Fri, 13 Mar 2020 23:12:51 +0000 (16:12 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 26 Mar 2020 21:27:18 +0000 (15:27 -0600)
commitf46f576280595f7c8feba454526b95a54e635798
tree431c23464d7b63cc50acac55afa34ad4fde3b00d
parentfb0bb3952401eac4e5a39551239f4e3bc9aeee4a
selftests/harness: Move test child waiting logic

In order to better handle timeout failures, rearrange the child waiting
logic into a separate function. This is mostly a copy/paste with an
indentation change. To handle pid tracking, a new field is added for
the child pid. Also move the alarm() pairing into the function.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/kselftest_harness.h