jorton 2003/11/23 15:23:53
Modified: test testpipe.c
Log:
* testpipe.c (test_pipe_writefull): Wait for the child and ensure it
terminates normally.
Revision Changes Path
1.25 +6 -0 apr/test/testpipe.c
Index: testpipe.c
===================================================================
RCS file: /home/cvs/apr/test/testpipe.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -u -r1.24 -r1.25
--- testpipe.c 5 Jun 2003 02:14:08 -0000 1.24
+++ testpipe.c 23 Nov 2003 23:23:53 -0000 1.25
@@ -183,6 +183,7 @@
apr_procattr_t *procattr;
const char *args[2];
apr_status_t rv;
+ apr_exit_why_e why;
rv = apr_procattr_create(&procattr, p);
CuAssertIntEquals(tc, APR_SUCCESS, rv);
@@ -221,6 +222,11 @@
CuAssertIntEquals(tc, APR_SUCCESS, rv);
bytes_processed = (int)apr_strtoi64(responsebuf, NULL, 10);
CuAssertIntEquals(tc, iterations * bytes_per_iteration, bytes_processed);
+
+ CuAssert(tc, "wait for child process",
+ apr_proc_wait(&proc, NULL, &why, APR_WAIT) == APR_CHILD_DONE);
+
+ CuAssert(tc, "child terminated normally", why == APR_PROC_EXIT);
}
CuSuite *testpipe(void)
|