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 3720de0..66fc1f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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.
        * m4/printf.m4 (gl_PRINTF_PRECISION): Test against AIX bug.
        * doc/posix-functions/dprintf.texi: Mention limited precision problem
index 0261348..3e35640 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);