stdlib: Fix tst-canon-bz26341 when the glibc build current working directory is itself using symlinks.

This commit is contained in:
omain GEISSLER 2021-10-20 12:01:40 -03:00 committed by Adhemerval Zanella
parent 82fd7314c7
commit e037274c8e

View File

@ -45,6 +45,12 @@ create_link (void)
TEST_VERIFY_EXIT (fd != -1);
xclose (fd);
/* Make filename a canonical path. */
char *saved_filename = filename;
filename = realpath (filename, NULL);
free (saved_filename);
TEST_VERIFY (filename != NULL);
/* Create MAXLINKS symbolic links to the temporary filename.
On exit, linkname has the last link created. */
char *prevlink = filename;