Kamil Dudka <[email protected]> wrote:

> On Thursday, November 08, 2012 21:12:05 Fabian Keil wrote:
> > The NTLM test 2032 is failing for me:
> 
> This was already reported a month ago.  I was debugging it, but was not able 
> to find a reliable solution to get that test working:
> 
> http://thread.gmane.org/gmane.comp.web.curl.library/37087

Thanks for the URL. I can confirm that your patch fixes the no-valgrind case.

> Any suggestions on how to fix it are welcome!

The attached patch (on top of yours) seems to get the
test working for me with valgrind as well.

Fabian
From 9f5109f7c91d5b7ad334abcd2ba3dddcc7dcf0e5 Mon Sep 17 00:00:00 2001
From: Fabian Keil <[email protected]>
Date: Sun, 18 Nov 2012 22:42:04 +0100
Subject: [PATCH] Get test 2032 working when using valgrind

If curl_multi_fdset() sets maxfd to -1, the socket detection
loop is skipped and thus !found_new_socket is no cause for alarm.
---
 tests/libtest/libntlmconnect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c
index 93ae06f..f596f7e 100644
--- a/tests/libtest/libntlmconnect.c
+++ b/tests/libtest/libntlmconnect.c
@@ -207,7 +207,7 @@ int test(char *url)
     }
 
     if (state == NeedSocketForNewHandle) {
-      if (!found_new_socket) {
+      if (maxfd != -1 && !found_new_socket) {
         fprintf(stderr, "Warning: socket did not open immediately for new "
                 "handle (trying again)\n");
         continue;
-- 
1.8.0

Attachment: signature.asc
Description: PGP signature

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to