This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]