From: omain GEISSLER Date: Wed, 20 Oct 2021 15:01:40 +0000 (-0300) Subject: stdlib: Fix tst-canon-bz26341 when the glibc build current working directory is itsel... X-Git-Tag: glibc-2.35~406 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e037274c8ec86ca9d491331984b34f30701b23cf;p=thirdparty%2Fglibc.git stdlib: Fix tst-canon-bz26341 when the glibc build current working directory is itself using symlinks. --- diff --git a/stdlib/tst-canon-bz26341.c b/stdlib/tst-canon-bz26341.c index acb0fd4ec30..fddf4adff3d 100644 --- a/stdlib/tst-canon-bz26341.c +++ b/stdlib/tst-canon-bz26341.c @@ -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;