[PATCH] io/tst-stat.c: Call mktemp to create a temporary file

Florian Weimer fweimer@redhat.com
Fri Jul 18 22:58:41 GMT 2025


* H. J. Lu:

>  typedef void (*test_t)(int, const char *path, struct stat *);
> +static char linkame[] = "/tmp/tst-fstat.linkname.XXXXXX";
>  
>  static int
>  do_test (void)
>  {
>    char *path;
> -  const char *linkame = "tst-fstat.linkname";
> +  TEST_VERIFY_EXIT (mktemp (linkame) != NULL);

Typo: link[n]ame

This results in a linker name.  Please use support_create_temp_directory
to create a randomly named directory and create the symbolic link inside
that (under a fixed name).

Thanks,
Florian



More information about the Libc-alpha mailing list