aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-03 21:16:16 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-08-03 22:43:27 +0200
commitcbf4aa422c82b895ab56ef5e9acda37947ad4184 (patch)
tree07d004af17dea48b1836417159f2e392fcf1bf52
parent2345bc44bb34f3eb6b49f4db3f0369573b892c3d (diff)
downloadglibc-cbf4aa422c82b895ab56ef5e9acda37947ad4184.zip
glibc-cbf4aa422c82b895ab56ef5e9acda37947ad4184.tar.gz
glibc-cbf4aa422c82b895ab56ef5e9acda37947ad4184.tar.bz2
tst-realpath-toolong: return "unsupported" when PATH_MAX is undefined
When PATH_MAX is undefined, realpath cannot ever ENAMETOOLONG, so this test is unsupported.
-rw-r--r--stdlib/tst-realpath-toolong.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/stdlib/tst-realpath-toolong.c b/stdlib/tst-realpath-toolong.c
index 4388890..a071fe7 100644
--- a/stdlib/tst-realpath-toolong.c
+++ b/stdlib/tst-realpath-toolong.c
@@ -24,18 +24,18 @@
#include <unistd.h>
#include <support/check.h>
#include <support/temp_file.h>
+#include <support/test-driver.h>
#include <sys/types.h>
#include <sys/stat.h>
#define BASENAME "tst-realpath-toolong."
-#ifndef PATH_MAX
-# define PATH_MAX 1024
-#endif
-
int
do_test (void)
{
+#ifndef PATH_MAX
+ return EXIT_UNSUPPORTED;
+#else
char *base = support_create_and_chdir_toolong_temp_directory (BASENAME);
char buf[PATH_MAX + 1];
@@ -48,6 +48,7 @@ do_test (void)
free (base);
return 0;
+#endif
}
#include <support/test-driver.c>