diff options
author | rooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68> | 2006-01-26 21:38:26 +0000 |
---|---|---|
committer | rooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68> | 2006-01-26 21:38:26 +0000 |
commit | 54f9f6d5042c03b56f5b878956343c83b37e9974 (patch) | |
tree | cdd364086d1a3e7502d9dcc634944f45a81f8f4a | |
parent | f4fa84cbfd00452737d045ce225dac9ee5975048 (diff) | |
download | libapr-54f9f6d5042c03b56f5b878956343c83b37e9974.tar.gz |
Merge r371198 to 0.9.x.
Original log message:
Keep testpipe.c from hanging on win32. Because of the way win32 pipes
work (and I totally don't understand all the details here) we don't get
all the same nonblocking semantics on win32 as we do on unix. We do
correctly return an error when trying to set timeouts on these kind of
pipes though, so look for that and avoid falling into an uninteruptable
read later if it happens.
* test/testpipe.c
(test_write): Don't try to make a nonblocking read if we couldn't set
the timeout, it'll just hang.
* CHANGES: Note change.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@372614 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | test/testpipe.c | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,7 @@ Changes with APR 0.9.8-dev + *) Keep testpipe.c from hanging on win32. [Garrett Rooney] + *) Documented that apr_stat and apr_dir_read can return APR_INCOMPLETE, and how to determine which parts of the resulting apr_finfo_t can be used in such a case. diff --git a/test/testpipe.c b/test/testpipe.c index 8c6f96fa0..ca45a699b 100644 --- a/test/testpipe.c +++ b/test/testpipe.c @@ -93,8 +93,10 @@ static void read_write(CuTest *tc) CuAssertIntEquals(tc, APR_SUCCESS, rv); rv = apr_file_read(readp, buf, &nbytes); - CuAssertIntEquals(tc, 1, APR_STATUS_IS_TIMEUP(rv)); - CuAssertIntEquals(tc, 0, nbytes); + if (!rv) { + CuAssertIntEquals(tc, 1, APR_STATUS_IS_TIMEUP(rv)); + CuAssertIntEquals(tc, 0, nbytes); + } } static void read_write_notimeout(CuTest *tc) |