static void
fstatat_check (int fd, const char *path, struct stat *st)
{
+ TEST_COMPARE (fstatat (fd, "", st, 0), -1);
+ TEST_COMPARE (errno, ENOENT);
+
+ TEST_COMPARE (fstatat (AT_FDCWD, "_non_existing_file", st, 0), -1);
+ TEST_COMPARE (errno, ENOENT);
+
TEST_COMPARE (fstatat (fd, path, st, 0), 0);
}
TEST_COMPARE (fstatat (fd, "", st, 0), -1);
TEST_COMPARE (errno, ENOENT);
+ TEST_COMPARE (fstatat (AT_FDCWD, "_non_existing_file", st, 0), -1);
+ TEST_COMPARE (errno, ENOENT);
+
TEST_COMPARE (fstatat (fd, path, st, 0), 0);
}
@item ENOTDIR
The descriptor @var{filedes} is not associated with a directory, and
@var{filename} is a relative file name.
+
+@item ENOENT
+The file named by @var{filename} does not exist, or @var{filename} is an
+empty string and @var{flags} does not contain @code{AT_EMPTY_PATH}.
@end table
When the sources are compiled with @code{_FILE_OFFSET_BITS == 64} this