diff options
author | Bruno Haible <bruno@clisp.org> | 2011-06-19 03:13:17 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-06-19 03:13:17 +0200 |
commit | e250cdd49b74828c25e98efa313954a395160180 (patch) | |
tree | 3208393d09e6116eb83a4f56aaec21bea86006e8 /tests/test-fsync.c | |
parent | d9a273b271b226547775c9b9798d7afd96ef5410 (diff) | |
download | gnulib-e250cdd49b74828c25e98efa313954a395160180.tar.gz |
fsync test: Avoid test failure on MacOS X and AIX.
* tests/test-fsync.c (fsync): Allow ENOTSUP and EBADF instead of
EINVAL.
Diffstat (limited to 'tests/test-fsync.c')
-rw-r--r-- | tests/test-fsync.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test-fsync.c b/tests/test-fsync.c index 84b3a70758..2627d0cba4 100644 --- a/tests/test-fsync.c +++ b/tests/test-fsync.c @@ -33,7 +33,12 @@ main (void) const char *file = "test-fsync.txt"; if (fsync (0) != 0) - ASSERT (errno == EINVAL); + { + ASSERT (errno == EINVAL /* POSIX */ + || errno == ENOTSUP /* seen on MacOS X 10.5 */ + || errno == EBADF /* seen on AIX 7.1 */ + ); + } fd = open (file, O_WRONLY|O_CREAT|O_TRUNC, 0644); ASSERT (0 <= fd); ASSERT (write (fd, "hello", 5) == 5); |