about summary refs log tree commit diff
diff options
context:
space:
mode:
-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;