* tests/test-linkat.c (main): Disallow EINVAL an alternative error
value.
* doc/posix-functions/linkat.texi: Document the GNU/Hurd bug.
2025-01-18 Collin Funk <collin.funk1@gmail.com>
+ linkat tests: Revert the last change.
+ * tests/test-linkat.c (main): Disallow EINVAL an alternative error
+ value.
+ * doc/posix-functions/linkat.texi: Document the GNU/Hurd bug.
+
linkat tests: Avoid failure on GNU/Hurd.
* tests/test-linkat.c (main): Allow EINVAL an alternative error value.
Portability problems not fixed by Gnulib:
@itemize
+@item
+@code{linkat (fd, "directory", fd, "symlink/" ...)} sets @code{errno}
+to @code{EINVAL} instead of @code{EEXIST} or @code{ENOTDIR} on some
+platforms:
+@c https://sourceware.org/bugzilla/show_bug.cgi?id=32569
+GNU/Hurd.
@end itemize
ASSERT (errno == EEXIST || errno == EPERM || errno == EACCES);
errno = 0;
ASSERT (linkat (dfd, BASE "link1", dfd, BASE "sub1/", 0) == -1);
- ASSERT (errno == EEXIST || errno == ENOTDIR || errno == EINVAL);
+ ASSERT (errno == EEXIST || errno == ENOTDIR);
errno = 0;
ASSERT (linkat (dfd, BASE "link1", dfd, BASE "sub1",
AT_SYMLINK_FOLLOW) == -1);