[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
test-fsync failure on Haiku
From: |
Bruno Haible |
Subject: |
test-fsync failure on Haiku |
Date: |
Sat, 15 Nov 2008 23:46:15 +0100 |
User-agent: |
KMail/1.5.4 |
Hi Richard, Jim,
The test-fsync test is failing on Haiku, at line 40. fsync (stdin), when
stdin refers to a terminal input, simply succeeds on this system. I don't
see anything in POSIX which would mandate a failure of this call.
OK to make the test a bit weaker?
2008-11-15 Bruno Haible <address@hidden>
* tests/test-fsync.c: Include <errno.h>.
(main): Don't require that fsync (0) fails.
--- tests/test-fsync.c.orig 2008-11-15 23:43:24.000000000 +0100
+++ tests/test-fsync.c 2008-11-15 23:42:45.000000000 +0100
@@ -15,6 +15,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
+
+#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
@@ -37,7 +39,8 @@
int fd;
const char *file = "test-fsync.txt";
- ASSERT (fsync (0) != 0);
+ if (fsync (0) != 0)
+ ASSERT (errno == EINVAL);
fd = open (file, O_WRONLY|O_CREAT|O_TRUNC, 0644);
ASSERT (0 <= fd);
ASSERT (write (fd, "hello", 5) == 5);
- test-fsync failure on Haiku,
Bruno Haible <=