diff options
author | Daniel Stenberg <daniel@haxx.se> | 2012-08-31 23:23:40 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-08-31 23:23:40 +0200 |
commit | 7735141e73a56810daf4b0727fb932f69386ce45 (patch) | |
tree | 8b1e439c70a074f9989f6e3f3a3df92228693280 /tests/libtest/libntlmconnect.c | |
parent | 5ede86ae51b8f71be35152584815f80dbd5a327a (diff) |
test2032: bail out after last transfer
The test would hang and get aborted with a "ABORTING TEST, since it
seems that it would have run forever." until I prevented that from
happening.
I also fixed the data file which got broken CRLF line endings when I
sucked down the path from Joe's repo == my fault.
Removed #37 from KNOWN_BUGS as this fix and test case verifies exactly
this.
Diffstat (limited to 'tests/libtest/libntlmconnect.c')
-rw-r--r-- | tests/libtest/libntlmconnect.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c index 8486f3c31..0ef8fc03f 100644 --- a/tests/libtest/libntlmconnect.c +++ b/tests/libtest/libntlmconnect.c @@ -207,6 +207,9 @@ int test(char *url) /* At this point, timeout is guaranteed to be greater or equal than -1. */ + fprintf(stderr, "%s:%d num_handles %d timeout %ld\n", + __FILE__, __LINE__, num_handles, timeout); + if(timeout != -1L) { interval.tv_sec = timeout/1000; interval.tv_usec = (timeout%1000)*1000; @@ -214,6 +217,13 @@ int test(char *url) else { interval.tv_sec = TEST_HANG_TIMEOUT/1000+1; interval.tv_usec = 0; + + /* if there's no timeout and we get here on the last handle, we may + already have read the last part of the stream so waiting makes no + sense */ + if(num_handles == 3) { + break; + } } select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &interval); |