Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1575248lqa; Mon, 29 Apr 2024 12:20:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMQxmXYPiBckIMp03xcCvPIG+xMnpOAXJ5nvDKKPQhmbPpTzTFiOTgfVADreO+S5MhwLJJSq+r3mh42bsaLMH0jBwe1BqNiN1jmgbvEQ== X-Google-Smtp-Source: AGHT+IG4o3cn9CkMHrfEyCyihk/gZcSsv2SrvqF6RSEvJbbBdoXf0W1bfnCu39ml6WTaHgB9JuOc X-Received: by 2002:a05:6870:d698:b0:229:929a:b127 with SMTP id z24-20020a056870d69800b00229929ab127mr13193669oap.37.1714418438167; Mon, 29 Apr 2024 12:20:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714418438; cv=pass; d=google.com; s=arc-20160816; b=OP3aNBNnF+IBFcZHiziFqOfMEJ0aRsygcp7Hcv+JQFsXVlvumK5D+OvBxnReeoGqjT Qd8R4ZaUSrgAbrnxD6SCL7w3jvVciWYnL3g03s3EQaZpimdfTDxoLlCCOwQgv0i8cxHE ZhrAfUfZMUKyROXQ+1aNLiKoXAbGRuxVQNYKHTZT7HkIvvtdOn87kxZpTLEpv71BmBDz rA/CvNGwYWCsmwJgCuVmvCqyzVFPyU7+zyj9M0xZmYImkk0WSITzIcQwSTKyb1m3h98z m1ttRKQ3GLzQQ+s8vYDP++LpXVkbDut3gGQCsLO1O0LIRumDHqh3eBsCSE62vyJTEWJT cxAw== 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=uiNklHCNFRzjgX5u5lHTpGrnre+xP1tNCMGF346ilGs=; fh=T/ngxZ/rchirObc+ozpAMGxUCKvTk1uHXxRS2gfk1OI=; b=JH1fSWtQXVy34hv7vUoBjto2vs819GNYFC7TuC0FE2DbWlXKVo7+fJ3b7eLOsm+S2p MdW948Ij3wnxJ7E5xC2tASiSPz1lp44lLcvy6TS+VQDtF4x/hHHRSuOzay1dvivZt5ka 0aOVDfflEuDfUOaFBN+uEsd7AqfU5pIujwWAvjVbsJyThnxz6p2kc3RzoGLzbAf9Etqv WSMKI/dt2ijGRhX4fDte4PIHEFLgsZxPAFpaQdmAhEdzJKdMPJEFImiSN6Jfr196eO0A re2jdt1bKODfygALs0XFAwonIst1WPIfUFP4oxxlUxSK9Wj/Hltu0B+0NU/mN4IaWx0+ WQHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=HkFsXhyp; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-162902-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162902-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c22-20020a637256000000b00615707f807csi770345pgn.115.2024.04.29.12.20.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 12:20:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162902-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=HkFsXhyp; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-162902-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162902-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D2F47B2286B for ; Mon, 29 Apr 2024 19:20:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDD1F13AD3E; Mon, 29 Apr 2024 19:19:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="HkFsXhyp" Received: from smtp-bc0c.mail.infomaniak.ch (smtp-bc0c.mail.infomaniak.ch [45.157.188.12]) (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 7052913BAFB for ; Mon, 29 Apr 2024 19:19:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.157.188.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714418365; cv=none; b=YLFQ65kwzYiYcMSKuRZTVQ0CStaeOtpWuOgDkKhDQ68vFPXq8D2zGYVT+IXPttiP4fhruCThAmIf8kVn3svCXCJsYE5udTm55BGYQyOHdvneg/+vKABv6UiHEBn7yklBwSuMjJiqx8GtpEIyzcptGBVgVr1B9iHRYEw/eoRZ+tE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714418365; c=relaxed/simple; bh=8sa48kjmxhX24SgrO37sT/zldbxAU6rathoZxgt9xR4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pfIbspJI8N5/4tz1oFTQbYy0pFTMaNY/S39lCbkMQVGu5ud6F7xapiBkqBsZTh1hIdPD6jsJkzeV1aX2RY75HClR8BL2XbKXQPfSO2d+gtqGcFtDwbBzMkYsU5uQ7bhmkzgFhHjcDW0+sjwo33ikObqPhHSuhkwOjAbgmuwUBAA= 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=HkFsXhyp; arc=none smtp.client-ip=45.157.188.12 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-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VStRs56WfzNkn; Mon, 29 Apr 2024 21:19:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1714418361; bh=8sa48kjmxhX24SgrO37sT/zldbxAU6rathoZxgt9xR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HkFsXhyp2LfRAwGPsD1wHqfeIFW3ltVU0A0bxstCX5AB+xPr8IRid8BDNtKdpXGGc KPJkE55WCKEYsHnGfkfG4PGFrAzTMAuIhvXXfDAd9yzSM1+GDQYt10VdZk1fyyNArA RAUBr1FgJLtcqofeaQcdT/UQf3vRtHYeNg6WgVMY= Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VStRs15cNzGVt; Mon, 29 Apr 2024 21:19:21 +0200 (CEST) From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: Christian Brauner , Jakub Kicinski , Kees Cook , Mark Brown , 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 , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan Subject: [PATCH v3 7/9] selftests/pidfd: Fix wrong expectation Date: Mon, 29 Apr 2024 21:19:09 +0200 Message-ID: <20240429191911.2552580-8-mic@digikod.net> In-Reply-To: <20240429191911.2552580-1-mic@digikod.net> References: <20240429191911.2552580-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: Christian Brauner Cc: Shuah Khan Reviewed-by: Kees Cook Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20240429191911.2552580-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.44.0