cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Test 2032 failing with NSS backend

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Mon, 15 Oct 2012 17:36:19 +0200

On Thursday 11 October 2012 21:02:14 Joe Mason wrote:
> > From: curl-library [curl-library-bounces_at_cool.haxx.se] on behalf of Paul
> > Howarth [paul_at_city-fan.org]
> > Subject: Test 2032 failing with NSS backend
> >
> > I'm seeing the same failure on Fedora 16, 17, 18 and Rawhide:
>
> ...
>
> > Warning: socket did not open immediately for new handle (trying again)
>
> This warning is probably significant. There may be something wrong with the
> logic of the test when the socket doesn't open immediately.

Not that I understand the logic of the test, but isn't the condition inverted
by mistake?

--- a/tests/libtest/libntlmconnect.c
+++ b/tests/libtest/libntlmconnect.c
@@ -206,9 +206,9 @@ int test(char *url)
       }
     }

     if (state == NeedSocketForNewHandle) {
- if (found_new_socket) {
+ if (!found_new_socket) {
         fprintf(stderr, "Warning: socket did not open immediately for new "
                 "handle (trying again)\n");
         continue;
       }

I think the test terminates prematurely in certain cases. The following patch
makes the test-suite running on my box:

--- a/tests/libtest/libntlmconnect.c
+++ b/tests/libtest/libntlmconnect.c
@@ -234,7 +234,7 @@ int test(char *url)
       /* 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 == MAX_EASY_HANDLES) {
+ if(!running && num_handles == MAX_EASY_HANDLES) {
         break;
       }
     }

Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-10-15