Hi Eric,
> + /* For a read-only regular file input file descriptor, fsync should
> + succeed (since at least atime changes can be synchronized). */
> + fd = open (file, O_RDONLY);
> + ASSERT (0 <= fd);
> + {
> +char buf[1];
> +ASSERT (read (fd, buf, sizeof buf) == sizeof buf);
> +
* 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