Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1413475lqm; Thu, 2 May 2024 14:11:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUTu4MyOwNDz42T7BRRFyVtbKYKTjPsjFBHKsVzXiHYpXAqreZXRwu64IcpUvOvRxT9KDlWNm/GuRwyvP6cUvrel3jM9H3V1KnRH3B29g== X-Google-Smtp-Source: AGHT+IE1pxPsmuGh7OxYvOoLDF/zG22wzbakNzBXCCGEbT+PuLPSVcg0HWaJGfW8B4WuUn4RqxHi X-Received: by 2002:a05:6a20:d80b:b0:1ad:6c5:4ea1 with SMTP id iv11-20020a056a20d80b00b001ad06c54ea1mr1161155pzb.41.1714684260822; Thu, 02 May 2024 14:11:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714684260; cv=pass; d=google.com; s=arc-20160816; b=IEk6ufTiT9eHGcJyknO3s0Wn3BBMvBskKm0DZjmC5ZaqgJJOAI6bAZjWleCGIko3j/ A5MR1i9dkoqvOu80F95M1h2s+a8F/cX77eW6Rrd9+MqrxYmxDQy4d0a3Fwc+Oz0OLC5V LmGbBgtk9oEusZVRt7+Bx+VYSgoP+5SjT2lF6EQWo1lF/YBtBEWfJseabrPRZRCPhWXG ZvtEssJ367a1Os4YzaMRGSI70Q2g1G4OtOGIE9okkvX0jfHFUyQLLuIXy4esWDJRKWB1 VX331wIPMkm2YCfRoFY+7rIEb4AYqB3VlKNDAbKj0jJcPhVepiW0ifS88buzqAUnlfhn V97w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=JRgTlMINM8AXAwQWx6+MKi43dAjpBF4XPmWt3egSveQ=; fh=DyJwEPHty4QZ77xuwgmyonrTSVvlIRI2bkR/2kTqG9Q=; b=HhIpz5WszPngaL1UlyxGr93vH+h6wWhV/xwqk13lo4JX0RZqnHclwJKUzDQGCmjA/l inFO44yU/ZkH3EYh3y1zhsadc8Xgd+8h74cNZ17l9Gd94/L7bvN7clCQDrApsRYyRDY6 tREy07X1UPKJnXkyU5G6QT5MTwpGkJfccPN0SD6aPY5OD7wGbfYz6oibQvALkF5NJ4XA kNHe4XQFfmRaK1zOdI4Ix79SxI73fQRCy2w4mAtO5gVxk5zBXzyvcLk2SLNVQ77HiUMP I0L8mHoPL29hIwIbiCQUuoHxa38wkPVCGCuUFCZjNSGeonx0lM3HT9fW3hLkzCunpELk +s7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=me3UiuiT; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-166916-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166916-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f19-20020a056a001ad300b006f2b141ef86si1713096pfv.136.2024.05.02.14.11.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 14:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166916-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=me3UiuiT; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-166916-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166916-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E77C1283A53 for ; Thu, 2 May 2024 21:10:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90CEE1C0DD1; Thu, 2 May 2024 21:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="me3UiuiT" Received: from smtp-bc09.mail.infomaniak.ch (smtp-bc09.mail.infomaniak.ch [45.157.188.9]) (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 7804818411A for ; Thu, 2 May 2024 21:09:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.157.188.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714684191; cv=none; b=Kan1u5br8ewNXRKnE8YZmDutS6hydGUongltb3Zhoyvd8kpzwOdNKTqNEpf1u+oWr4qI51kRDEFhw0tBDZA7WVFd56l47i+f/89q3qJK6AKA+RzMcjhqZxLANSqkPksTfao05u7AmwP/AbLSSe73z8UGdHmbjbbGDxZsQTOVpWw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714684191; c=relaxed/simple; bh=6QKYOrdzJppIqKyHAIvgA7WW5vjmQK1fdvdMiBvid54=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IXJCTFC2giXPyIUb8hUbJ3FRqD7unWX+JZz3RZMBNd2lBBjgtofW74O2S25Db0Gef6CCHxN7lIKOSSJSm80+DGUHqbgsZ8HGczvLzazD9F7DXEZ0hwhHkHNqaMRoic43saVvW3McHSEXkiyh6mNk81iwJQ/R0OFiXz9+eA9I6Pk= 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=me3UiuiT; arc=none smtp.client-ip=45.157.188.9 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 Received: from smtp-4-0000.mail.infomaniak.ch (smtp-4-0000.mail.infomaniak.ch [10.7.10.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VVmlv741fzLQ2; Thu, 2 May 2024 23:09:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1714684187; bh=6QKYOrdzJppIqKyHAIvgA7WW5vjmQK1fdvdMiBvid54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=me3UiuiTo9L4KbjRC31w7Yq+MfVhL+ME0ZFXeZJlS8sv2/4VjHU/NpfMs9etTiCC6 SD6s7G6p2gmfPDxQGFLBJIaUcJTt9Kt6l5POZAWhpAXq4zFdIzTXr4e0FPPevvlwCe 62bOqF9KHfmnxtDfs/LizG28HFnpM5Zw8dvsIxlg= Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VVmlv30fKzLRB; Thu, 2 May 2024 23:09:47 +0200 (CEST) From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: Christian Brauner , Jakub Kicinski , Kees Cook , Mark Brown , Sean Christopherson , Shengyu Li , Shuah Khan Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , "David S . Miller" , =?UTF-8?q?G=C3=BCnther=20Noack?= , Will Drewry , kernel test robot , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan Subject: [PATCH v4 07/10] selftests/pidfd: Fix wrong expectation Date: Thu, 2 May 2024 23:09:23 +0200 Message-ID: <20240502210926.145539-8-mic@digikod.net> In-Reply-To: <20240502210926.145539-1-mic@digikod.net> References: <20240502210926.145539-1-mic@digikod.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Shuah Khan Reviewed-by: Kees Cook Reviewed-by: Christian Brauner Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20240502210926.145539-8-mic@digikod.net --- 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); -- 2.45.0