diff options
author | Ivan Zhakov <ivan@apache.org> | 2019-05-28 19:45:06 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2019-05-28 19:45:06 +0000 |
commit | 44faed2a69fdfd531319ad8928137406a403ab31 (patch) | |
tree | a88a088acb576cfad2f647213362623399a23e79 /test/testpipe.c | |
parent | 8ff039d6f88da734d984167947dc73dedb8b86d9 (diff) | |
download | apr-44faed2a69fdfd531319ad8928137406a403ab31.tar.gz |
Windows platform: Make pipe test report 'not implemented' instead of failing.
* test/testpipe.c
(wait_pipe): Use apr_file_pipe_create_ex() to create non-blocking pipe.
Check for APR_ENOTIMPL status code from apr_file_pipe_wait().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860301 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testpipe.c')
-rw-r--r-- | test/testpipe.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/testpipe.c b/test/testpipe.c index 810ffe7b5..4965d57de 100644 --- a/test/testpipe.c +++ b/test/testpipe.c @@ -194,7 +194,7 @@ static void wait_pipe(abts_case *tc, void *data) apr_time_t end_time; apr_size_t nbytes; - rv = apr_file_pipe_create(&readp, &writep, p); + rv = apr_file_pipe_create_ex(&readp, &writep, APR_WRITE_BLOCK, p); APR_ASSERT_SUCCESS(tc, "Couldn't create pipe", rv); rv = apr_file_pipe_timeout_set(readp, delay); @@ -202,6 +202,11 @@ static void wait_pipe(abts_case *tc, void *data) start_time = apr_time_now(); rv = apr_file_pipe_wait(readp, APR_WAIT_READ); + + if (rv == APR_ENOTIMPL) { + ABTS_NOT_IMPL(tc, "apr_file_pipe_wait() not implemented"); + return; + } ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv)); end_time = apr_time_now(); |