# HG changeset patch # User Paolo Bonzini # Date 1221553586 -7200 # Node ID 344142aabdceda15c00b2a520bf9cca0e0c131de # Parent 7b4e990d9c2c41d2fc806d1fc2371ca9f60c28f8 allow non-blocking connect to succeed, as it does on OpenBSD 2008-09-16 Paolo Bonzini * tests/test-poll.c (connect_to_socket): Allow non-blocking connect to succeed. diff -r 7b4e990d9c2c -r 344142aabdce ChangeLog --- a/ChangeLog Mon Sep 15 14:37:49 2008 +0200 +++ b/ChangeLog Tue Sep 16 10:26:26 2008 +0200 @@ -1,3 +1,8 @@ +2008-09-16 Paolo Bonzini + + * tests/test-poll.c (connect_to_socket): Allow non-blocking connect + to succeed. + 2008-09-16 Jim Meyering avoid spurious test failure when library is built without ACL support diff -r 7b4e990d9c2c -r 344142aabdce tests/test-poll.c --- a/tests/test-poll.c Mon Sep 15 14:37:49 2008 +0200 +++ b/tests/test-poll.c Tue Sep 16 10:26:26 2008 +0200 @@ -139,16 +139,12 @@ #endif } - if (connect (s, (struct sockaddr *) &ia, sizeof (ia)) < 0) + if (connect (s, (struct sockaddr *) &ia, sizeof (ia)) < 0 + && (blocking || errno != EINPROGRESS)) { - if (errno != EINPROGRESS) - { - perror ("connect"); - exit (77); - } + perror ("connect"); + exit (77); } - else if (!blocking) - failed ("huh, connect succeeded?"); return s; }