[PATCH] io/tst-stat.c: Call mktemp to create a temporary file
H.J. Lu
hjl.tools@gmail.com
Sat Jul 19 00:03:39 GMT 2025
On Fri, Jul 18, 2025 at 3:58 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * 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).
>
Fixed in the v2 patch.
--
H.J.
More information about the Libc-alpha
mailing list