Factor out the waiting for children in bionic tests.

Change-Id: I4a1e51b6920b33dc892d447f5bd6d10f1cb2704a
diff --git a/tests/sys_select_test.cpp b/tests/sys_select_test.cpp
index d4ac333..4ad77f0 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 @@
   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) {