]> Savannah Git Hosting - gnulib.git/commitdiff
fsync tests: Skip test that is known to fail.
authorBruno Haible <bruno@clisp.org>
Thu, 12 Dec 2019 01:52:11 +0000 (02:52 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 12 Dec 2019 01:52:11 +0000 (02:52 +0100)
* 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
doc/posix-functions/fsync.texi
tests/test-fsync.c

index 326c446e7781909c4ac41a819f8a903ea3d6d9b8..ab6859e5fbf5b7c2de11f4133e5ff38336b0f344 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-12-11  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        getaddrinfo: Fix calling convention in 32-bit mode on native Windows.
index 3328af7c0a536264bf740cd15d16e6b5ebfe09a4..24305db340ec8ccbad279b6958174ec612f3e24c 100644 (file)
@@ -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
index d613cf018df972a59ca24a99d78486aac985e41e..b7b5cba2d0cfe636f1f25e796d5a1254737dfea0 100644 (file)
@@ -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);