Re: [PATCH v2 7/9] selftests/pidfd: Fix wrong expectation

From: Kees Cook
Date: Mon Apr 29 2024 - 11:56:35 EST


On Mon, Apr 29, 2024 at 03:09:29PM +0200, Mickaël Salaün wrote:
> Replace a wrong EXPECT_GT(self->child_pid_exited, 0) with EXPECT_GE(),
> which will be actually tested on the parent and child sides with a
> following commit.
>
> Cc: Christian Brauner <brauner@xxxxxxxxxx>
> Cc: Kees Cook <keescook@xxxxxxxxxxxx>
> Cc: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Mickaël Salaün <mic@xxxxxxxxxxx>

I had to take a closer look at this one -- but yes, this should be just
checking for failure (negative). The parent/child separation is
afterwards.

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

--
Kees Cook