From patchwork Mon Apr 29 13:09:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= X-Patchwork-Id: 13646929 Received: from smtp-42a8.mail.infomaniak.ch (smtp-42a8.mail.infomaniak.ch [84.16.66.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FBBE7BAF9 for ; Mon, 29 Apr 2024 13:09:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=84.16.66.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714396195; cv=none; b=LthpBDAJZjkIXzQEc3Aafki5HuR6lBONBz275Fulc/5fInbO3yzCiQE3nekQf6JALotkUuQiT1W3qQ2fVMBFnvuKHlEpwpZ8F8mGT1pZ+MkY8To/jcrGPuMQ7+Mh3nvYMk+03yRhl4zwdLXKANwHkZwysR7HnxhOA9x4o9M9AsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714396195; c=relaxed/simple; bh=Di4akVdlawrQeihQeWvBuO2Ker/fO5bz8gIl7ebo7+0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AtBOT79Px4IBhS71ama/Hf4+bGJr8KO8dzOY5YXQqRwMjhm6N5jkSSYcEw+gnw7lq7LUt+lSzTbhrncYnK/Y0dBurhffZC6YACxoIinpiNJ+wA8UIkIMI8JB55z5PCWJTb8SGZAbCJ5oQWnKyy6qZcoHNDMaKXtWX6KwNjuGWCI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net; spf=pass smtp.mailfrom=digikod.net; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b=KnWg7xma; arc=none smtp.client-ip=84.16.66.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=digikod.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="KnWg7xma" Received: from smtp-4-0000.mail.infomaniak.ch (smtp-4-0000.mail.infomaniak.ch [10.7.10.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VSkFQ0FjFzMBH; Mon, 29 Apr 2024 15:09:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1714396185; bh=Di4akVdlawrQeihQeWvBuO2Ker/fO5bz8gIl7ebo7+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KnWg7xmaA/WSCfeQer8yQA8Ja+kFqo5w85K2OSiDfGMQ4vk4j83Ocd5sFBqsrkmu6 nQbqAl2l1SlXlOmAwXg/389g5tywq+JinV9TRTwZTCuaXIpVHnXwYSAAwdFcAfgWv6 BRT5CEy+y3wwx85GktGkCE1YrbkjqXxeXnWMY63c= Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VSkFP3RVpzKTX; Mon, 29 Apr 2024 15:09:45 +0200 (CEST) From: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= To: Christian Brauner , Jakub Kicinski , Kees Cook , Mark Brown , Shengyu Li , Shuah Khan Cc: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= , "David S . Miller" , =?utf-8?q?G=C3=BCnther_Noack?= , Will Drewry , kernel test robot , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan Subject: [PATCH v2 7/9] selftests/pidfd: Fix wrong expectation Date: Mon, 29 Apr 2024 15:09:29 +0200 Message-ID: <20240429130931.2394118-8-mic@digikod.net> In-Reply-To: <20240429130931.2394118-1-mic@digikod.net> References: <20240429130931.2394118-1-mic@digikod.net> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Infomaniak-Routing: alpha 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 Cc: Kees Cook Cc: Shuah Khan Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20240429130931.2394118-8-mic@digikod.net Reviewed-by: Kees Cook --- Changes since v1: * Extract change from a bigger patch (suggested by Kees). --- tools/testing/selftests/pidfd/pidfd_setns_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/pidfd/pidfd_setns_test.c b/tools/testing/selftests/pidfd/pidfd_setns_test.c index 6e2f2cd400ca..47746b0c6acd 100644 --- a/tools/testing/selftests/pidfd/pidfd_setns_test.c +++ b/tools/testing/selftests/pidfd/pidfd_setns_test.c @@ -158,7 +158,7 @@ FIXTURE_SETUP(current_nsset) /* Create task that exits right away. */ self->child_pid_exited = create_child(&self->child_pidfd_exited, CLONE_NEWUSER | CLONE_NEWNET); - EXPECT_GT(self->child_pid_exited, 0); + EXPECT_GE(self->child_pid_exited, 0); if (self->child_pid_exited == 0) _exit(EXIT_SUCCESS);