From: Tony Cook Date: Tue, 17 Jul 2012 05:48:02 +0000 (+1000) Subject: sync() on a read-only file handle doesn't work on cygwin either X-Git-Tag: upstream/5.20.0~6064 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d6399864e7a82ac32047d65a43a064193e46846;p=platform%2Fupstream%2Fperl.git sync() on a read-only file handle doesn't work on cygwin either Cygwin fsync() is implemented in terms of the Win32 FlushFileBuffers() API which requires GENERIC_WRITE access. --- diff --git a/dist/IO/t/io_xs.t b/dist/IO/t/io_xs.t index 85fbc56..b731447 100644 --- a/dist/IO/t/io_xs.t +++ b/dist/IO/t/io_xs.t @@ -45,7 +45,10 @@ SKIP: or skip "No fsync", 1; $^O eq 'aix' and skip "fsync() documented to fail on non-writable handles on AIX", 1; + $^O eq 'cygwin' + and skip "fsync() on cygwin uses FlushFileBuffers which requires a writable handle", 1; open my $fh, "<", "t/io_xs.t" or skip "Cannot open t/io_xs.t read-only: $!", 1; - ok($fh->sync, "sync to a read only handle"); + ok($fh->sync, "sync to a read only handle") + or diag "sync(): ", $!; }