Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1171100lqo; Sat, 11 May 2024 10:15:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX6reh9WISL8nhodELmrBR44PufAsb1wddRl+IJsjqV2M1oyWW+ZEv7nqneE0lIX9PgZALSFjpN6LqHDr/gW102mFO1iEjnPPGYA4TDTQ== X-Google-Smtp-Source: AGHT+IFc57Pl8dp7ksruocQih+oFRFCITgcn445liXRxuU3CqR58s1psWdLLW6ED8rx98kXiuAT0 X-Received: by 2002:a17:902:a50a:b0:1e0:b62c:460d with SMTP id d9443c01a7336-1ef43e2659emr61434305ad.38.1715447757127; Sat, 11 May 2024 10:15:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715447757; cv=pass; d=google.com; s=arc-20160816; b=xy6W58Gh92dsyMLfXXvEJWWkcCNBmENwECiq8YTk//sMcOLNcLDJQwDVdMNs86FYVF x5KE1m273Psj53OYuyUV5U9TErNrrTaHOncgyxiIOx7SWpcdKWEDlr0MrGG6AtFil8vl d8JRpu7c5chmZZJRCWNozywIhpksB0w2Ct2FVtnIEDfHbihTp7WELomwOOwzJ0Mr+FlJ kIJnxGlRfX3JhBTPBf7PqA6iwN16Fqxvxqv5VEtOUr/gCL2ao9Cz1wOhJMI94L2Lhu6G 8PKvEWqkUF4f4MNO3pAhAZaWhJ0/7ZmSsZ7Dax+2NlSKbe3frDBMj+9Pzxo1P4QXE461 XLiA== 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=1juTZw5rMh5qFeSewclGWXXQHXc6Bnq1ZcGeaudqNmE=; fh=h2xHIZSGiUwuZyladnT9pE6uX086qy42ByZk41PjzSs=; b=g34yAjzb1EqmNvp8QWete8stUMUzm7twkwPBIAFCns6gWq1H3xGw3eNAyla7Atnjd3 8hxnHB19F88BPqDtMUG++dPdYuGlCiElyZmOfcqkwQqqZ5L0wG0uo7KkJL0kB5ZrTd0G zaZ0H7vuFL+Clwa/PhVJL31nLogY403bcgklud1QLrwMpLMo/2+xS5kc2tRn8kAuGiuW B4s7D6L5ojwH7zf77XpXnzkHkAMHS0z+FzCReqGgafSKTHoBftaHAAprMuczri33EfQz soAMngcV1xhBt6VaNYL3WqK/uYBud6ntAqmztKWH9xRuOOE0dc1I9/OQste6ioNlMR95 b5iw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=kvBpZNEA; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-176656-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176656-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 d9443c01a7336-1ef0c13932dsi61409535ad.454.2024.05.11.10.15.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 10:15:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176656-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=kvBpZNEA; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-176656-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176656-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 A5001282139 for ; Sat, 11 May 2024 17:15:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D625524B26; Sat, 11 May 2024 17:15:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="kvBpZNEA" Received: from smtp-8fad.mail.infomaniak.ch (smtp-8fad.mail.infomaniak.ch [83.166.143.173]) (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 41A201BC58 for ; Sat, 11 May 2024 17:15:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.166.143.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715447704; cv=none; b=QxiDhwJcZJ2uWYQrJNvr2Mbb9EsWF9RMbxnJVff0dPQk40MQzRtnwVP6Xrk/jsfvI7NElJbtQv14tHw+9HpKeyV991PtDOg3nipEIml+6JEDh4KPvSpsASBk9+DDjBI/zENsIkqO8zyel11RhVPUGTTAUDb6Cy0+M0puLV7e31Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715447704; c=relaxed/simple; bh=JKF3m1X2Qve13Up/xJM5YVxErBJgFtHz9XG/b40gioU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jbbGYDnsPpAxVKvfrQH7/9Ulx1B1BSJX5zsEBqw6dZYF3MugVGNAfAlLapgeKqz1ysm6e7QOS4HGXA+ZgY/RRJD9fvkB5EeGlpUZqSbdizaFMIni5l9Gl8Icv9fYVes0tWApbzZC5MQhI9+k2PExvyaqMr00ga9ZfOPFDMtz/ao= 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=kvBpZNEA; arc=none smtp.client-ip=83.166.143.173 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-3-0001.mail.infomaniak.ch (smtp-3-0001.mail.infomaniak.ch [10.4.36.108]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VcC6r1Zp3zm5r; Sat, 11 May 2024 19:15:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digikod.net; s=20191114; t=1715447700; bh=1juTZw5rMh5qFeSewclGWXXQHXc6Bnq1ZcGeaudqNmE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kvBpZNEA5+41ZVZLy2WiivpsXa1adrWMaQyu6P725KNrWRZqTW9JJvHFz2X95ZvLQ 4k9AAQupuDRGquxDLHjpDTP1Pr2eQ+XAtYVGoa7FN2Vi4ywsc320X9GiUYo09Qr+bM Q8ACKOcTlOr4l9zYOzVQFg8YNPp3ZdpyAHeKdRew= Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4VcC6q3hKpzshG; Sat, 11 May 2024 19:14:59 +0200 (CEST) From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: Christian Brauner , Greg Kroah-Hartman , Jakub Kicinski , Kees Cook , Linus Torvalds , Mark Brown , Sasha Levin , Sean Christopherson , Shengyu Li , Shuah Khan , Shuah Khan Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Bagas Sanjaya , Brendan Higgins , David Gow , "David S . Miller" , Florian Fainelli , =?UTF-8?q?G=C3=BCnther=20Noack?= , Jon Hunter , Ron Economos , Ronald Warsow , Stephen Rothwell , Will Drewry , kernel test robot , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v7 07/10] selftests/pidfd: Fix wrong expectation Date: Sat, 11 May 2024 19:14:42 +0200 Message-ID: <20240511171445.904356-8-mic@digikod.net> In-Reply-To: <20240511171445.904356-1-mic@digikod.net> References: <20240511171445.904356-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/20240511171445.904356-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