[PATCH v2] linux: wait4: Fix incorrect return value comparison

Alistair Francis alistair23@gmail.com
Thu Apr 9 20:13:07 GMT 2020


On Thu, Apr 9, 2020 at 8:36 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Alistair Francis via Libc-alpha:
>
> > On Tue, Apr 7, 2020 at 6:25 AM Adhemerval Zanella via Libc-alpha
> > <libc-alpha@sourceware.org> wrote:
> >>
> >>
> >>
> >> On 07/04/2020 08:23, Florian Weimer via Libc-alpha wrote:
> >> > * Alistair Francis via Libc-alpha:
> >> >
> >> >> Path 600f00b "linux: Use long time_t for wait4/getrusage" introduced
> >> >
> >> > Typo: "Path"
> >> >
> >> >> two bugs:
> >> >>  - The usage32 struct was set if the wait4 syscall had an error.
> >> >>  - For 32-bit systems the usage struct was set even if it was specified
> >> >>    as NULL.
> >> >>
> >> >> This patch fixes the two issues.
> >> >
> >> > Would it make sense to include a test case?
> >> >
> >> > (Somehow, my earlier message did not make it it to the list.)
> >>
> >> I think it would, specially now that glibc does more internally.
> >
> > I agree.
> >
> > Would you like me to write it or does someone who knows more about the
> > glibc tests like to do it?
>
> It looks like we should commit the patch sooner than later.

Just posted v3.

>
> We can work on the test case next week.  Either I can teach you to how
> to write it, or I can write it myself.

I also wrote a wait4 test. It's very simple but should have caught
this issue. Let me know what you think. I couldn't easily think of
anything else to add to the test case.

Alistair

>
> Would you please post a v3 with just the indentation fixes?
>
> Thanks,
> Florian
>


More information about the Libc-alpha mailing list