Mercurial > hg > octave-nkf > gnulib-hg
changeset 15288:d0747ac1503a
fsync test: Avoid test failure on MacOS X and AIX.
* tests/test-fsync.c (fsync): Allow ENOTSUP and EBADF instead of
EINVAL.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 19 Jun 2011 03:13:17 +0200 |
parents | 223683be3038 |
children | d0be0ef239a7 |
files | ChangeLog tests/test-fsync.c |
diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-06-18 Bruno Haible <bruno@clisp.org> + + fsync test: Avoid test failure on MacOS X and AIX. + * tests/test-fsync.c (fsync): Allow ENOTSUP and EBADF instead of + EINVAL. + 2011-06-18 Bruno Haible <bruno@clisp.org> openat, fdopendir tests: Fix link errors.
--- a/tests/test-fsync.c +++ b/tests/test-fsync.c @@ -33,7 +33,12 @@ 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);