This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] test-skeleton.c: Use stdout for error messages
- From: Will Newton <will dot newton at linaro dot org>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 23 Jun 2014 11:26:03 +0100
- Subject: Re: [PATCH] test-skeleton.c: Use stdout for error messages
- Authentication-results: sourceware.org; auth=none
- References: <1397227769-7214-1-git-send-email-will dot newton at linaro dot org> <20140411172556 dot GO25518 at spoyarek dot pnq dot redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1406192147560 dot 2033 at digraph dot polyomino dot org dot uk>
On 19 June 2014 22:49, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Fri, 11 Apr 2014, Siddhesh Poyarekar wrote:
>
>> > diff --git a/test-skeleton.c b/test-skeleton.c
>> > index d7d2f75..dd7de8b 100644
>> > --- a/test-skeleton.c
>> > +++ b/test-skeleton.c
>> > @@ -160,7 +160,7 @@ signal_handler (int sig __attribute__ ((unused)))
>> > }
>> > if (killed != 0 && killed != pid)
>> > {
>> > - perror ("Failed to kill test process");
>> > + printf ("Failed to kill test process: %s\n", strerror (errno));
>>
>> You could just use %m here. Likewise for other instances of strerror.
>
> Agreed.
>
>> > if (killed == 0 || (WIFSIGNALED (status) && WTERMSIG (status) == SIGKILL))
>> > - fputs ("Timed out: killed the child process\n", stderr);
>> > + puts ("Timed out: killed the child process\n");
>
> puts outputs a newline implicitly, so when converting to puts you should
> remove the \n from the string.
>
>> This looks good to me with the above changes, but I think a senior
>> maintainer should review this as well before it goes in.
>
> The patch is OK with the requested changes.
Thanks, pushed with those changes.
--
Will Newton
Toolchain Working Group, Linaro