+
+ /* 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);
+ }
+ ASSERT (fsync (fd) == 0);
+ ASSERT (close (fd) == 0);
+