* tests/test-fsync.c (main): Also test behavior on read-only text
file.
Signed-off-by: Eric Blake
---
I've tested Linux so far, we'll see what testing on other platforms reveals.
ChangeLog |6 ++
tests/test-fsync.c | 15 +++
2 files changed, 21 insertions(+), 0 d
Eric Blake wrote:
> > Why not test both? Like this proposed patch. ...
>
> Looks good to me. Maybe we should also test reopening file in O_RDONLY
> mode, since fsync on a tty is much different than fsync on a regular file.
The idea of checking fd 0 is that it's likely in O_RDONLY mode.
> POSIX
On 09/16/2011 03:44 PM, Bruno Haible wrote:
On MSVC 9, I'm getting a syntax error in gnulib's here:
static inline int
rpl_mkdir (char const *name, mode_t mode)
because mode_t is not defined. According to POSIX:2008, mode_t ought to be
defined in each of
(and other heade
On MSVC 9, I'm getting a syntax error in gnulib's here:
static inline int
rpl_mkdir (char const *name, mode_t mode)
because mode_t is not defined. According to POSIX:2008, mode_t ought to be
defined in each of
(and other headers which gnulib does not support yet). Here's the fi
On MSVC 9, S_IFIFO and S_IFBLK are not defined, leading to compilation errors
in tests/test-sys_stat.c. But _S_IFIFO is defined and can be used to define
S_IFIFO.
It appears ok to have a platform without S_IFBLK, so I'm relaxing the test
in this respect:
2011-09-16 Bruno Haible
sys_s
On 09/16/2011 02:56 PM, Bruno Haible wrote:
On MSVC 9, off_t is defined in and. It is not
defined so far when is included. But POSIX:2008 wants off_t to be
defined in each of
Again, for the record, POSIX also requires off_t in these headers not
yet wrapped by gnulib:
* lib/parse-datetime.y (relative_time_table): Add 'hence'.
* tests/test-parse-datetime.c (main): Enhance test.
Suggested by Jesse Wilson.
Signed-off-by: Eric Blake
---
> Since you've already got "AGO", it makes a great deal of sense to add
> "HENCE" to parse-datetime so we can change the date li
On 09/16/2011 02:37 PM, Bruno Haible wrote:
The original intent of that code was to test the behaviour of fsync on a
read-only file descriptor, and STDIN_FILENO is one. Why should it be better
to test STDOUT_FILENO?
Why not test both? Like this proposed patch. (Which also add blank
lines as sepa
On MSVC 9, off_t is defined in and . It is not
defined so far when is included. But POSIX:2008 wants off_t to be
defined in each of
This fixes it:
2011-09-16 Bruno Haible
Support for MSVC compiler: Ensure off_t gets defined.
* lib/unistd.in.h: Include .
Eric Blake wrote:
>
> - if (fsync (0) != 0)
> + if (fsync (STDOUT_FILENO) != 0)
> {
>ASSERT (errno == EINVAL /* POSIX */
>|| errno == ENOTSUP /* seen on MacOS X 10.5 */
>|| errno == EBADF /* seen on AIX 7.1 */
> - );
> + );
>
Cater to Solaris requiring extra libraries for fdatasync.
* m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Set LIB_FDATASYNC.
* modules/fdatasync (Link): Document it.
* modules/fdatasync-tests (test_fdatasync_LDADD): Link with it.
Signed-off-by: Eric Blake
---
I think this rounds out my fdatasync work fo
MacOS X 10.7 added an fdatasync syscall and exports a symbol for it,
but fails to declare it anywhere. Lacking any hard evidence that this
syscall is broken, we will just provide the declaration and use it.
* m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Check for present but not
declared.
* m4/unistd_h.m
(dropped the cc by accident)
- Forwarded message from Michael Stone -
On Fri, Sep 16, 2011 at 09:02:20PM +0200, you wrote:
Then maybe your system has problems with long names?
What is errno when getcwd returns NULL here?
also ENOENT
/* If libc has the bug in question, this invocati
Michael Stone wrote:
> On Fri, Sep 16, 2011 at 06:54:32PM +0200, Jim Meyering wrote:
>>Michael Stone wrote:
>>> This one was actually in gnulib; what's the best way to pursue it?
>>>
>>> FAIL: test-getcwd (exit: 16)
>>>
>>
>>Hi Michael,
>>
>>Thanks for the report.
>>I'
On 09/16/11 11:28, Eric Blake wrote:
> Do we know this to be the case, or are you just going off of web searches?
The latter. I just now tried to find that stuff again, and couldn't,
so let's just ignore it for now. If the problem turns up again
we can fix it later.
The whole fsync/fdatasync/O_
Every time I run a gnulib test on a Solaris 10 box with NFS home drive,
it fails to remove the test directory. I've isolated it down to a
minimal case:
gnulib-tool --with-tests --test verify
complains about:
rm: cannot remove `testdir17481/gltests': File exists
Sure enough, it leaves behind
On Fri, Sep 16, 2011 at 06:54:32PM +0200, Jim Meyering wrote:
Michael Stone wrote:
This one was actually in gnulib; what's the best way to pursue it?
FAIL: test-getcwd (exit: 16)
Hi Michael,
Thanks for the report.
I'll Cc bug-gnulib, but to start with, note that
Picks up some ideas by Paul Eggert from here:
https://lists.gnu.org/archive/html/bug-coreutils/2011-07/msg00157.html
* modules/fdatasync (Depends-on): Add condition for fsync.
* lib/fdatasync.c (fdatasync): Add comment.
* tests/test-unistd-c++.cc: Test fdatasync.
Signed-off-by: Eric Blake
---
C
Michael Stone wrote:
> This one was actually in gnulib; what's the best way to pursue it?
>
> FAIL: test-getcwd (exit: 16)
>
Hi Michael,
Thanks for the report.
I'll Cc bug-gnulib, but to start with, note that test-getcwd.c's main
does this:
return test_abort_bug ()
On 07/22/2011 03:13 PM, Paul Eggert wrote:
Surely coreutils is not the only program that will have problems
with fdatasync on Mac OS. How about the following gnulib patches?
Portability problems fixed by Gnulib:
@itemize
+@item
+This function is present but undeclared and ineffective on
usleep only exists in POSIX 2001, but for the rest of the functions
where we pointed to online POSIX specs, we might as well point to the
latest version of the standard.
* lib/unistd.in.h: Prefer POSIX 2008 over 2001.
Suggested by Bruno Haible.
Signed-off-by: Eric Blake
---
Too bad the Open Gro
On 09/16/2011 11:44 AM, Paul Eggert wrote:
Thanks, did you have a look at my earlier proposed
module for fdatasync, and Bruno's comments about it?
It addresses some issues that your module does not,
e.g., fdatasync is present but undeclared
and ineffective on MacOS X 10.7. (I never got around to
Thanks, did you have a look at my earlier proposed
module for fdatasync, and Bruno's comments about it?
It addresses some issues that your module does not,
e.g., fdatasync is present but undeclared
and ineffective on MacOS X 10.7. (I never got around to
pushing that earlier proposal, alas)
ht
At least libvirt would like to use the lighter-weight fdatasync
on platforms where it is supported, while still guaranteeing full
sync (via the heavy-weight fsync fallback) on all platforms.
I've got an open question to the Austin Group, since the POSIX 2008
wording is self-contradictory (unlike f
This test failed to compile on mingw, which lacks ENOTSUP. Furthermore,
it wasn't testing POSIX behavior on invalid fds.
* modules/fsync-tests (Depends-on): Add errno, for mingw.
* tests/test-fsync.c (main): Enhance test.
Signed-off-by: Eric Blake
---
ChangeLog |6 ++
modules
25 matches
Mail list logo