Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp661151lqs; Tue, 5 Mar 2024 12:27:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXEh0lc9KGjEKouS2eSh3DHObeORB4POHVe+nL0E3aeeDr20p+qM65xbO1ygg2M/bvctACc3rdT3hDgANfw/2ccxeEDo0YQcWKZMrwnMg== X-Google-Smtp-Source: AGHT+IH3s/FmCj1ru5se87aNUX9M+5NwSFvzEnzHFpRwHJ7kUOEozDO4D06wkqsjD+dgBbx0n04J X-Received: by 2002:ad4:5a0f:0:b0:68f:cf6f:6782 with SMTP id ei15-20020ad45a0f000000b0068fcf6f6782mr2660923qvb.14.1709670455230; Tue, 05 Mar 2024 12:27:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709670455; cv=pass; d=google.com; s=arc-20160816; b=W4R2N7/vwyIHUsxPBEjmAdmbg1D61MWUa93ids1tgauD1n2C+o6gfL8JMzWtNn+mfM RjHc+077G4BX2JrZW52uG/LmpPREgSoloje2+OVWCntvEKc5X14BBAKyaI9fzQ1rnlf8 K+B1rOiURV52Dprjp+FjzzivLrmkronIt5p929crniQTZ/HR96/BmUaCgQluyeEYk70g eNZGnbu9bjWvnAellRvFsZnVB//E5DPJv+Pmia4uZp1a8pvy8aVpzCZL8Qxbb/wXgt7t CSpVFBqjNpef/ilD3JGyTLQ+fKgtw7C4ECWsqvbPCYuSVlGHp3j9wvZa8F24cZafHPpE G4Yg== 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 :subject:cc:to:from:date:dkim-signature; bh=2sYZ9VYEczvOE+IUcKCnvnGNl6nyGCV1z36GnDlfaBw=; fh=hMin1en1nqeIS69H6jxdBfa/NZhZ4dkSICdhtNB6NSs=; b=hGT588vf1P/A2XjyUrQNaGOE+bB9cSQZn7WZzkmLShVvIPYaatFUXZJn5SlspVQeUL TF2WMsOjrc9MGy6KQs1FelFJU4jOlwnYGFYK1PPZXqxBbiQhW8plEuKua70UcyIOLdVt lhw/ZQ4F6xwBFDfPASv4uKdWLVbx0gBMFb6m3rm/T5QsTuQgjFwSDetkfVBFQ36jTND6 6yopDa+HVi8sOb5NRT2RvwdG1dUBR2VsA+ON5GhAlREk/tZ5KwEukvCUMHZtLDX3kEUQ LiRkz9ED2KUda6zlroHMB17EXlfxRdd/ujpjJ6DsdlC33vdvR0eaVL00mwBS1loMmQv7 THSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qE5K1wUo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ks27-20020a056214311b00b006900582d48bsi13102269qvb.160.2024.03.05.12.27.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 12:27:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qE5K1wUo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92963-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BE7421C22873 for ; Tue, 5 Mar 2024 20:26:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D853A12B168; Tue, 5 Mar 2024 20:25:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qE5K1wUo" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 05225129A66; Tue, 5 Mar 2024 20:25:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709670357; cv=none; b=i69wDo/x89gvdSMNJfadyaSUXl8l/ag7iF19VhP6d5NoqcYsakgKr9J9PlYOXiaiA5/8EicwUhdd6cNGLsO9Wcw2zF542fRlfFneJ6xLsGHKJRsXAPC0RiPVLk64Vt/Pp+Yos8r4nIdv4J37hadpyia5yoM8IHfz0vGHEF+lAGU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709670357; c=relaxed/simple; bh=twGZuSpW/OlwcJKaoJzLeolSrwNRJlzj3LP+VjhWkZA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mN7SDKrjmfcO48GlM10dlS1+76P7WAau0DG+txUNhl2uEB0YUDZFVR8EuIxK4ZBBB+J2qCEilVEnGc3t9T+7RwGBdTxuvQJxHftiXWO6/Gg4nv7LRZ5l9RwlO6mNakwREh9exNu9Zakd/QE41DFy6KVDVPN/lLYBu/oqOtIuNt4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qE5K1wUo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3211C433F1; Tue, 5 Mar 2024 20:25:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709670356; bh=twGZuSpW/OlwcJKaoJzLeolSrwNRJlzj3LP+VjhWkZA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qE5K1wUo76qnPiNlHLxTKGyEbTtDi6YvsKz9JozKv9o0F72ivEAjamCWq5tfLUQqS vHixmexOppZ+XDz3WS/SJEJy+QLABp+mUV0Xi3EykX3J6LIqcwMam3RaNTqJ0qW/R3 IDuaNv/qt005XnpCdNYOSF/CIDcBqMKd/9FdIsx/8jDZvfk66ch80y68qLgPrbBf6e d66roe1k5G3kHlaApnPG94m1hLQ+s7/Xunuy7Yq5IVL6imS6V1qxA4tH3higv15GIC 5McCBJ7AdSAr7owcU0YJxo3VtPyz84q/FQxnvddkLttJgHszjoJxrIklyyguy+nEW8 rdPDtZKkA/yXA== Date: Tue, 5 Mar 2024 12:25:54 -0800 From: Jakub Kicinski To: =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= Cc: "David S . Miller" , Kees Cook , Mark Brown , Shuah Khan , =?UTF-8?B?R8O8bnRoZXI=?= 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: <20240305122554.1e42c423@kernel.org> In-Reply-To: <20240305201029.1331333-1-mic@digikod.net> References: <20240305.sheeF9yain1O@digikod.net> <20240305201029.1331333-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: quoted-printable On Tue, 5 Mar 2024 21:10:29 +0100 Micka=C3=ABl Sala=C3=BCn 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). >=20 > 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. >=20 > 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. >=20 > Cc: David S. Miller > Cc: G=C3=BCnther 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 Your S-o-b is missing. Should be enough if you responded with it. Code LGTM, thanks!