diff options
author | Elliott Hughes <enh@google.com> | 2016-01-26 13:04:57 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2016-01-26 13:13:52 -0800 |
commit | 33697a0c43c48e15c3bcf018138b9b837d0099cd (patch) | |
tree | 5abb2ab07c7f1322defd9fd6313cd11e12978579 /tests/sys_select_test.cpp | |
parent | 94bb0fab931102f1fcf393aa507a6b77b741844f (diff) |
Factor out the waiting for children in bionic tests.
Change-Id: I4a1e51b6920b33dc892d447f5bd6d10f1cb2704a
Diffstat (limited to 'tests/sys_select_test.cpp')
-rw-r--r-- | tests/sys_select_test.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/sys_select_test.cpp b/tests/sys_select_test.cpp index d4ac333d2..4ad77f087 100644 --- a/tests/sys_select_test.cpp +++ b/tests/sys_select_test.cpp @@ -23,6 +23,8 @@ #include <sys/types.h> #include <sys/wait.h> +#include "utils.h" + TEST(sys_select, fd_set_smoke) { fd_set fds; FD_ZERO(&fds); @@ -68,7 +70,8 @@ static void DelayedWriteCleanup(int pid, int fd) { char buf[sizeof(DELAY_MSG)]; ASSERT_EQ(static_cast<ssize_t>(sizeof(DELAY_MSG)), read(fd, buf, sizeof(DELAY_MSG))); ASSERT_STREQ(DELAY_MSG, buf); - ASSERT_EQ(pid, waitpid(pid, NULL, 0)); + + AssertChildExited(pid, 0); } TEST(sys_select, select_smoke) { |