Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tests,aix: avoid running fsync on directory
The underlying fsync system call returns EBADF on a file descriptor
for an open directory. So avoid running fsync on it.
  • Loading branch information
jBarz committed Jun 13, 2018
commit d28958a6b695ab4ace10307a2bc115995fa3f3d9
4 changes: 4 additions & 0 deletions test/parallel/test-fs-utimes.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ function stat_resource(resource) {
if (typeof resource === 'string') {
return fs.statSync(resource);
} else {
const stats = fs.fstatSync(resource);
// ensure mtime has been written to disk
// except for directories on AIX where it cannot be synced
if (common.isAIX && stats.isDirectory())
return stats;
fs.fsyncSync(resource);
return fs.fstatSync(resource);
}
Expand Down