select tests: Avoid failures on OSF/1 5.1.
authorBruno Haible <bruno@clisp.org>
Sat, 25 Dec 2010 00:26:18 +0000 (01:26 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 25 Dec 2010 00:26:18 +0000 (01:26 +0100)
* tests/test-select.c (test_accept_first, test_socket_pair): Ignore
failure of closing the last socket; it may fail with ECONNRESET.

ChangeLog
tests/test-select.c

index b0ddade..6124d25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-24  Bruno Haible  <bruno@clisp.org>
+
+       select tests: Avoid failures on OSF/1 5.1.
+       * tests/test-select.c (test_accept_first, test_socket_pair): Ignore
+       failure of closing the last socket; it may fail with ECONNRESET.
+
 2010-12-24  Eric Blake  <eblake@redhat.com>
 
        stdint: avoid HP-UX 10.20 preprocessor bug
index 9c895c3..b9b3f84 100644 (file)
@@ -310,7 +310,7 @@ test_accept_first (void)
         failed ("cannot read data left in the socket by closed process");
       ASSERT (read (c, buf, 3) == 3);
       ASSERT (write (c, "foo", 3) == 3);
-      ASSERT (close (c) == 0);
+      (void) close (c); /* may fail with errno = ECONNRESET */
     }
 #endif
 }
@@ -354,7 +354,7 @@ test_socket_pair (void)
   test_pair (c1, c2);
   ASSERT (close (c1) == 0);
   ASSERT (write (c2, "foo", 3) == 3);
-  ASSERT (close (c2) == 0);
+  (void) close (c2); /* may fail with errno = ECONNRESET */
 }