bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fsync: document AIX misbehavior


From: Bruno Haible
Subject: Re: [PATCH] fsync: document AIX misbehavior
Date: Thu, 12 Dec 2019 02:53:04 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-166-generic; KDE/5.18.0; x86_64; ; )

Paul Eggert wrote in
<https://lists.gnu.org/archive/html/bug-gnulib/2015-06/msg00019.html>:
> +2015-06-06  Paul Eggert  <address@hidden>
> +
> +     fsync: document AIX misbehavior
> +     * doc/posix-functions/fsync.texi (fsync):
> +     Document failure on AIX with read-only file descriptor.

I'm still seeing failures of this test, in line 74, on AIX 7.2 and Cygwin 2.9.

Since we documented that we don't fix this issue in gnulib, it is pointless to
check it in the test suite. In fact, it distracts me from the more relevant
tests that are possibly regressions.


2019-12-11  Bruno Haible  <address@hidden>

        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.

diff --git a/doc/posix-functions/fsync.texi b/doc/posix-functions/fsync.texi
index 3328af7..24305db 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 d613cf0..b7b5cba 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);
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]