Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp903849lqs; Tue, 5 Mar 2024 23:26:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXEu8zJ90zlm+EsKR0VqvFSX6nR7Voq5G+H5RfM/NnjwJrQioWqgF3hdPGB34/HApzZait1EPOVwh+SN7j43jlDp1tUqXWhfVLTuKh8Eg== X-Google-Smtp-Source: AGHT+IG0VNXtrWxUq9clEbgpHlQ2clHP2J1snsgMzV/kJSXSFThRYimRFg5GIUqFlF99NBtBkysi X-Received: by 2002:a17:906:4709:b0:a45:5831:4f00 with SMTP id y9-20020a170906470900b00a4558314f00mr4841724ejq.75.1709709973089; Tue, 05 Mar 2024 23:26:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709709973; cv=pass; d=google.com; s=arc-20160816; b=Jtf5Lfojzk5sbIvpN0agDdLeTMxpZIIh7SLvEW74hzhgSvBQIXJVIlQWnAs4FT9NYF F25TxmK/qz/OvIv4K6J9vogV2794D19MGpQ3RkjGp6Vy/R/yzKXJJvYCZ1iV0dSUy4k3 soOmDCzzVUD8J+N/8qdvGZ+tjUGI0fTzkWHwtF/sUMVi9z2zlKoRB8D8H5COdjlgiM9J WNz3RlzDq+fHp+fLhOuXY+tICtnVw6Sl35Wyi1JAhyto9vbGmv+bC7wSW6aEFtesU4pR kZpFt9/5ykGHDRbbE7yTYzho9H8Bwh1e98/WpWAWfDklrFBimRGljw5cA7VD0Rm45y+T WFlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/Lb8rVBlj78ixw/ealmvI9JxxtKGH5/f3SIaXXvBXsA=; fh=zN573xxm4nAOZLCRcLBD8pvpOyTv+UeEiYwaWUOMoBs=; b=vUDAdknQPZhqye0bYYzY66AZyBK9EShq2dA/QQAPRpq+bPtTAZDbY6s61U3nFxtR1L zC2fruOVPvAd2TpOPQotrCc/4v47r+YY+iEddGEdSQ5exs8o0G8ws/YcIiXnow6pSRxi FgxJwV3F3M/sP8VBqz3WIH3x7MG3yz8v5fO/fLOB0rVqMF7vEUqFF/0dVrxCO25acKuw uYg3Y2h4TaHobXS/N8gW0bhPkcJwHqBgginqIlkNLWVYAx3So9kGd5agJyoXj9vPURq3 UJLGrV3RpVzdjBfkSfIAeEKkAUzx6oT29RZ6LWXo/p9KOztbGHg8uwpZI3nwMFeVKHmN 4lug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=ctO2DSiL; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-93425-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93425-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w5-20020a170906384500b00a458ad6fde6si1828942ejc.372.2024.03.05.23.26.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 23:26:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93425-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=ctO2DSiL; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-93425-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93425-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C8C861F23213 for ; Wed, 6 Mar 2024 07:26:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D58FC5C8EB; Wed, 6 Mar 2024 07:26:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="ctO2DSiL" Received: from smtp-8fa9.mail.infomaniak.ch (smtp-8fa9.mail.infomaniak.ch [83.166.143.169]) (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 C343E5C5F9 for ; Wed, 6 Mar 2024 07:26:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.166.143.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709709965; cv=none; b=kB2T/x7odX78ObTvig16D7jyPmAzW5CezUp9eUbkRiZ3reqjJhZ5g03JbNaw5JC6eE4KECcYf2zm9njA2Vuy+xpyQF0TgQAzstYrBcnArE84GzU0G1f65LZTNgHHQ//ij8t9pKz2DmfwYlz1/raqIjepwaJpbzVJqFWaNKANVVc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709709965; c=relaxed/simple; bh=Z1nsfA7d27x2MPQyf9yBVEThRd7U3+QWKY6OTCTdDOM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FoSYT5P4oC/zD1zPwFunxm7K64H/yYXPrzdQbW+egw4YVre1r+DqRnxGRje78zpll8Y48gL2nAIDsg1pPWLvbKBlyrK4DIWCKMTKWIqaJbVLkjjiud6kvSbTINTxSICYplDUQ0bu43Z+Fuxy6ue4JgDpviYKYkMaMzc2JqWn96I= 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=ctO2DSiL; arc=none smtp.client-ip=83.166.143.169 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-0001.mail.infomaniak.ch (smtp-4-0001.mail.infomaniak.ch [10.7.10.108]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4TqP9Z4kq6zJND; Wed, 6 Mar 2024 08:25:54 +0100 (CET) Received: from unknown by smtp-4-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4TqP9Y5nGPzgdC; Wed, 6 Mar 2024 08:25:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1709709954; bh=Z1nsfA7d27x2MPQyf9yBVEThRd7U3+QWKY6OTCTdDOM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ctO2DSiLO+vK5KmeHfs8b6V0dgjR7bszcgds6DtedXdNBQ//TV6I04aD6lQJbe1Sy i/igkeHWkD3OWAroBzbK7bhwPzzUDOqqwMkgfR9SRrk0i0wXElKjMz83bx4aWqQF2M rmQOaT7gT05NyZPC36vItGgZ6sQSusKmYNLbKorE= Date: Wed, 6 Mar 2024 08:25:43 +0100 From: =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= To: Jakub Kicinski Cc: "David S . Miller" , Kees Cook , Mark Brown , Shuah Khan , =?utf-8?Q?G=C3=BCnther?= Noack , Will Drewry , edumazet@google.com, jakub@cloudflare.com, pabeni@redhat.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-security-module@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] selftests/harness: Fix TEST_F()'s vfork handling Message-ID: <20240306.Hei7aekahvaj@digikod.net> References: <20240305.sheeF9yain1O@digikod.net> <20240305201029.1331333-1-mic@digikod.net> <20240305122554.1e42c423@kernel.org> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240305122554.1e42c423@kernel.org> X-Infomaniak-Routing: alpha On Tue, Mar 05, 2024 at 12:25:54PM -0800, Jakub Kicinski wrote: > On Tue, 5 Mar 2024 21:10:29 +0100 Mickaël Salaün wrote: > > Always run fixture setup in the grandchild process, and by default also > > run the teardown in the same process. However, this change makes it > > possible to run the teardown in a parent process when > > _metadata->teardown_parent is set to true (e.g. in fixture setup). > > > > Fix TEST_SIGNAL() by forwarding grandchild's signal to its parent. Fix > > seccomp tests by running the test setup in the parent of the test > > thread, as expected by the related test code. Fix Landlock tests by > > waiting for the grandchild before processing _metadata. > > > > Use of exit(3) in tests should be OK because the environment in which > > the vfork(2) call happen is already dedicated to the running test (with > > flushed stdio, setpgrp() call), see __run_test() and the call to fork(2) > > just before running the setup/test/teardown. Even if the test > > configures its own exit handlers, they will not be run by the parent > > because it never calls exit(3), and the test function either ends with a > > call to _exit(2) or a signal. > > > > Cc: David S. Miller > > Cc: Günther Noack > > Cc: Jakub Kicinski > > Cc: Kees Cook > > Cc: Mark Brown > > Cc: Shuah Khan > > Cc: Will Drewry > > Fixes: 0710a1a73fb4 ("selftests/harness: Merge TEST_F_FORK() into TEST_F()") > > Link: https://lore.kernel.org/r/20240305201029.1331333-1-mic@digikod.net Signed-off-by: Mickaël Salaün > > Your S-o-b is missing. Should be enough if you responded with it. > > Code LGTM, thanks! >