2008-09-16 Paolo Bonzini <bonzini@gnu.org>
* tests/test-poll.c (connect_to_socket): Allow non-blocking connect
to succeed.
+2008-09-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * tests/test-poll.c (connect_to_socket): Allow non-blocking connect
+ to succeed.
+
2008-09-16 Jim Meyering <meyering@redhat.com>
avoid spurious test failure when library is built without ACL support
#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;
}