[PATCH v3 2/3] Add test for warn, warnx, vwarn, and vwarnx with floating-point parameters

Florian Weimer fweimer@redhat.com
Mon Nov 5 11:40:00 GMT 2018


* Gabriel F. T. Gomes:

> +  FILE *fp = open_memstream (&buffer, &length);

I think I mentioned xopen_memstream before.

> +  /* Write to the buffer using one of the *warn* functions.  */
> +  switch (select)
> +    {

You need to initialize errno to zero before the switch, I think.  The
test is currently rather brittle.

> +  /* Check that the rest of the output is as expected.  */
> +  if (strcmp (buffer, expected) != 0)
> +    FAIL_EXIT1 ("unexpected output: %s", buffer);

It would also help to include expected output here, so that the context
of the failure is clearer.

Okay with these changes.

Thanks,
Florian



More information about the Libc-alpha mailing list