changeset 15297:d73db0fa5bff

pread test: Avoid test failure on OpenBSD 4.9. * tests/test-pread.c (main): Allow EFBIG instead of EINBAL.
author Bruno Haible <bruno@clisp.org>
date Sun, 19 Jun 2011 16:36:39 +0200
parents fa0d7f167907
children 9f6aa6c9dd0e
files ChangeLog tests/test-pread.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/tests/test-pread.c
+++ b/tests/test-pread.c
@@ -68,7 +68,9 @@
     /* 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);