about summary refs log tree commit diff
diff options
context:
space:
mode:
authoromain GEISSLER <romain.geissler@amadeus.com>2021-10-20 12:01:40 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-10-20 12:01:40 -0300
commite037274c8ec86ca9d491331984b34f30701b23cf (patch)
tree696bc32a36d23604c5b54efb5197919d88ff6b01
parent82fd7314c7df8c5555dce027df6f2c98ca5a927f (diff)
downloadglibc-e037274c8ec86ca9d491331984b34f30701b23cf.tar.gz
glibc-e037274c8ec86ca9d491331984b34f30701b23cf.tar.xz
glibc-e037274c8ec86ca9d491331984b34f30701b23cf.zip
stdlib: Fix tst-canon-bz26341 when the glibc build current working directory is itself using symlinks.
-rw-r--r--stdlib/tst-canon-bz26341.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/stdlib/tst-canon-bz26341.c b/stdlib/tst-canon-bz26341.c
index acb0fd4ec3..fddf4adff3 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;