Skip to content

Commit 821bc4a

Browse files
committed
selftests/pidfd: Fix wrong expectation
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: Shuah Khan <skhan@linuxfoundation.org> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Christian Brauner <brauner@kernel.org> Link: https://lore.kernel.org/r/20240511171445.904356-8-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
1 parent cc80aa9 commit 821bc4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/pidfd/pidfd_setns_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ FIXTURE_SETUP(current_nsset)
158158
/* Create task that exits right away. */
159159
self->child_pid_exited = create_child(&self->child_pidfd_exited,
160160
CLONE_NEWUSER | CLONE_NEWNET);
161-
EXPECT_GT(self->child_pid_exited, 0);
161+
EXPECT_GE(self->child_pid_exited, 0);
162162

163163
if (self->child_pid_exited == 0)
164164
_exit(EXIT_SUCCESS);

0 commit comments

Comments
 (0)