diff options
Diffstat (limited to 'deps/uv/test/test-fs.c')
-rw-r--r-- | deps/uv/test/test-fs.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/deps/uv/test/test-fs.c b/deps/uv/test/test-fs.c index 5eed160de2..35f7d0c3f1 100644 --- a/deps/uv/test/test-fs.c +++ b/deps/uv/test/test-fs.c @@ -30,7 +30,8 @@ /* FIXME we shouldn't need to branch in this file */ #if defined(__unix__) || defined(__POSIX__) || \ - defined(__APPLE__) || defined(_AIX) || defined(__MVS__) + defined(__APPLE__) || defined(__sun) || \ + defined(_AIX) || defined(__MVS__) #include <unistd.h> /* unlink, rmdir, etc. */ #else # include <winioctl.h> @@ -1248,6 +1249,16 @@ TEST_IMPL(fs_fstat) { #endif #endif +#if defined(__linux__) + /* If statx() is supported, the birth time should be equal to the change time + * because we just created the file. On older kernels, it's set to zero. + */ + ASSERT(s->st_birthtim.tv_sec == 0 || + s->st_birthtim.tv_sec == t.st_ctim.tv_sec); + ASSERT(s->st_birthtim.tv_nsec == 0 || + s->st_birthtim.tv_nsec == t.st_ctim.tv_nsec); +#endif + uv_fs_req_cleanup(&req); /* Now do the uv_fs_fstat call asynchronously */ |