mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
tst-realpath-toolong: return "unsupported" when PATH_MAX is undefined
When PATH_MAX is undefined, realpath cannot ever ENAMETOOLONG, so this test is unsupported.
This commit is contained in:
parent
2345bc44bb
commit
cbf4aa422c
@ -24,18 +24,18 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <support/check.h>
|
#include <support/check.h>
|
||||||
#include <support/temp_file.h>
|
#include <support/temp_file.h>
|
||||||
|
#include <support/test-driver.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#define BASENAME "tst-realpath-toolong."
|
#define BASENAME "tst-realpath-toolong."
|
||||||
|
|
||||||
#ifndef PATH_MAX
|
|
||||||
# define PATH_MAX 1024
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
do_test (void)
|
do_test (void)
|
||||||
{
|
{
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
return EXIT_UNSUPPORTED;
|
||||||
|
#else
|
||||||
char *base = support_create_and_chdir_toolong_temp_directory (BASENAME);
|
char *base = support_create_and_chdir_toolong_temp_directory (BASENAME);
|
||||||
|
|
||||||
char buf[PATH_MAX + 1];
|
char buf[PATH_MAX + 1];
|
||||||
@ -48,6 +48,7 @@ do_test (void)
|
|||||||
|
|
||||||
free (base);
|
free (base);
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <support/test-driver.c>
|
#include <support/test-driver.c>
|
||||||
|
Loading…
Reference in New Issue
Block a user