From 8de83b9d8f871cd283ca4853e592290a82955fcb Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 12 Dec 2019 02:52:11 +0100 Subject: [PATCH] fsync tests: Skip test that is known to fail. * doc/posix-functions/fsync.texi: Update list of platforms. * tests/test-fsync.c (main): Skip test with read-only file descriptors that is known to fail on AIX and Cygwin. --- ChangeLog | 7 +++++++ doc/posix-functions/fsync.texi | 2 +- tests/test-fsync.c | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 326c446e77..ab6859e5fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2019-12-11 Bruno Haible + + fsync tests: Skip test that is known to fail. + * doc/posix-functions/fsync.texi: Update list of platforms. + * tests/test-fsync.c (main): Skip test with read-only file descriptors + that is known to fail on AIX and Cygwin. + 2019-12-11 Bruno Haible getaddrinfo: Fix calling convention in 32-bit mode on native Windows. diff --git a/doc/posix-functions/fsync.texi b/doc/posix-functions/fsync.texi index 3328af7c0a..24305db340 100644 --- a/doc/posix-functions/fsync.texi +++ b/doc/posix-functions/fsync.texi @@ -18,5 +18,5 @@ Portability problems not fixed by Gnulib: @item If the argument is a read-only file descriptor, this function fails with @code{EBADF} on some platforms: -AIX 7.1. +AIX 7.2, Cygwin 2.9. @end itemize diff --git a/tests/test-fsync.c b/tests/test-fsync.c index d613cf018d..b7b5cba2d0 100644 --- a/tests/test-fsync.c +++ b/tests/test-fsync.c @@ -64,7 +64,9 @@ main (void) ASSERT (close (fd) == 0); /* For a read-only regular file input file descriptor, fsync should - succeed (since at least atime changes can be synchronized). */ + succeed (since at least atime changes can be synchronized). + On AIX and Cygwin, this test would fail. */ +#if !(defined _AIX || defined __CYGWIN__) fd = open (file, O_RDONLY); ASSERT (0 <= fd); { @@ -73,6 +75,7 @@ main (void) } ASSERT (fsync (fd) == 0); ASSERT (close (fd) == 0); +#endif ASSERT (unlink (file) == 0); -- 2.39.5