pread test: Avoid test failure on OpenBSD 4.9.
authorBruno Haible <bruno@clisp.org>
Sun, 19 Jun 2011 14:36:39 +0000 (16:36 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 19 Jun 2011 14:36:39 +0000 (16:36 +0200)
* tests/test-pread.c (main): Allow EFBIG instead of EINBAL.

ChangeLog
tests/test-pread.c

index 3720de04aa39a7f918f8c15ea8db035d8b2ce311..66fc1f1c942b61e9bbd7b74aabe2f332d01d09fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-19  Bruno Haible  <bruno@clisp.org>
+
+       pread test: Avoid test failure on OpenBSD 4.9.
+       * tests/test-pread.c (main): Allow EFBIG instead of EINBAL.
+
 2011-06-19  Bruno Haible  <bruno@clisp.org>
 
        sprintf-posix: Fix test failure on AIX 7.1.
index 026134874a24aca9d9b4efea99c64f74434ac9ee..3e3564084413d84c9839a899311c6b91e8e4a28c 100644 (file)
@@ -68,7 +68,9 @@ main (void)
     /* Invalid offset must evoke failure with EINVAL.  */
     char byte;
     ASSERT (pread (fd, &byte, 1, (off_t) -1) == -1);
-    ASSERT (errno == EINVAL);
+    ASSERT (errno == EINVAL
+            || errno == EFBIG /* seen on OpenBSD 4.9 */
+           );
   }
 
   ASSERT (close (fd) == 0);