2025-06-12 Bruno Haible <bruno@clisp.org>
+ lstat tests: Avoid test failure on Solaris.
+ * tests/test-lstat.h (test_lstat_func): Reduce assumption about
+ /dev/null on Solaris.
+
stat, lstat, fstat tests: Enhance tests regarding /dev/null or NUL.
* tests/test-fstat.c: Include <fcntl.h>.
(main): Check that fstat reports /dev/null or NUL as a character device.
ASSERT (func (BASE "file/", &st1) == -1);
ASSERT (errno == ENOTDIR);
- /* /dev/null is a character device. */
+ /* /dev/null is a character device.
+ Except on Solaris, where it is a symlink. */
#if defined _WIN32 && !defined __CYGWIN__
ASSERT (func ("NUL", &st1) == 0);
#else
ASSERT (func ("/dev/null", &st1) == 0);
#endif
ASSERT (!S_ISREG (st1.st_mode));
+#if !defined __sun
ASSERT (S_ISCHR (st1.st_mode));
+#endif
/* Now for some symlink tests, where supported. We set up:
link1 -> directory