bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

test-pread.sh failure


From: Bruno Haible
Subject: test-pread.sh failure
Date: Sun, 19 Jun 2011 11:16:06 +0200
User-agent: KMail/1.9.9

Hi Jim,

>       1 x FAIL: test-pread.sh

> OpenBSD 4.9:
> 
> test-pread.c:71: assertion failed
> FAIL: test-pread.sh

Here the errno value for a negative offset is EFBIG, not EINVAL.

Jim, OK to relax the test, like this?


2011-06-19  Bruno Haible  <address@hidden>

        pread test: Avoid test failure on OpenBSD 4.9.
        * tests/test-pread.c (main): Allow EFBIG instead of EINBAL.

--- tests/test-pread.c.orig     Sun Jun 19 11:15:48 2011
+++ tests/test-pread.c  Sun Jun 19 11:12:33 2011
@@ -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);
-- 
In memoriam Alois Eliáš <http://en.wikipedia.org/wiki/Alois_Eliáš>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]