Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1410409rbb; Mon, 26 Feb 2024 08:24:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUvzEni10xIn6yA0XeLqpxetAQEPo7JIEVI68pm5S/iA5aFyE4EPD8f+5rxgRbG27wYPIhmClR0uhQCfw4LcpFaMVEj+YokxeCoBh2kAg== X-Google-Smtp-Source: AGHT+IHyWSR9smSA6+AYeQij2u+MrxuNGpGprR8hEDqdjm4fcJJ5mB4dLAGtUS4xjMDBgoh4QPbc X-Received: by 2002:a1f:eb84:0:b0:4cb:c322:6fb5 with SMTP id j126-20020a1feb84000000b004cbc3226fb5mr4012235vkh.3.1708964677334; Mon, 26 Feb 2024 08:24:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708964677; cv=pass; d=google.com; s=arc-20160816; b=x3xaGxuocdpYLDbTVXZBkAJK9mqAlrOqZHcdJ+1snoCbrO8P1lS6Eg49mZmYonEiQR B7hS/M38MoMZ5okcGaG1tBB2BWaI9y3fd5DEZkYZbtiFCIs0SpDuv68PzoBUZTzDzc7O sT1za4LVPDpW7aYiduK1zparqRmT/TJn5NzRZzAiGrU90owiDB/Oh//vEFnTumi+PYfu 5RgBow91VSIR+W+Qui157MzfyMpN9p+2Fij5apDKGucF5kEX9So2w4y9Abw1xcseuIMw An7TIirOr/JqWB0p9U9fCOe0XZiZ/8PIzysSPnVw9vnD4/LclAg7G+z/vyindTfwYUPK ggcg== 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=RWpjmlAs5uN55zt8YC8Tf0FPyv/9mkcoQuZE0jzOkMg=; fh=K0JPSFdNpi/Cfy8dtq3QIYRSBCp2/NcVcn+SzLGvTsE=; b=c07QIipQCgIDMWoTEbk9VteN6J4Bd3NMLIwqu7pLbDWz8paPOxRN5SmA804hJLivjk IH5xgLolFBFisGB+CCLqVF9rB+mWsXynZcdt9ylGbOBrHQGDAAyofLj0NDPLJVij6Xag VQRz0WdJkxwlVkk5SM+UjncsvvVTgWRrHGO2UdHqG7umfaY7nYhWI3COuFITluoT1dRW ebSRanq78N5P74vp1fYv47+9eY+S7IhUBITp3yvzTw/k3Qb+sb0eHZUV3UGFYYUjzfz8 8t/QRvRu//F1pmKpW7q5UfUFiRH2hKH5Hga3jvHbRgYPUi2AClXwvkMxCF0LfCZkT1Cu Ep2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=YaPaegVb; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-81896-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81896-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h17-20020a056130011100b007da420b589bsi708631uag.187.2024.02.26.08.24.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 08:24:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81896-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=YaPaegVb; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-81896-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81896-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EF6FB1C2A955 for ; Mon, 26 Feb 2024 16:24:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C883A12E1CC; Mon, 26 Feb 2024 16:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="YaPaegVb" 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 D6AF612D761; Mon, 26 Feb 2024 16:23:53 +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=1708964638; cv=none; b=Tk4j762Be+BJ7qBNpeCfIYMafposhoeHF0DvayBkM7zbRx0swUIQUgvt1miMvQosMkEO6N1wONHpmPxtst+/iAS4TcnGyKMc17T8+AIek1FwpsBGHxftcSbDGnV0yU95bTlN8m8NwkwWwGrvMPXYd7/s4M+AhQRMZDrrpM7NI8w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708964638; c=relaxed/simple; bh=lzn0jtPveq2aZBuWKiD3pKlsYwgBRJ4U7D5p8D9Xa9s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bdezgmXiI/dp3bnU+QQWqJLhzXiy7SGRSJvOy5Zwjro6CJA3FRBnS8GYIwfRxATIr7meqEw29kqTV/Y0aoKTbTGaE8whiUzqrDCCT3VYIyvXOFJlSOPeeNVtlMlyBo1xbnguXMMT1WHv3NRa8Dk41U+u1uldXbaGlx7RM437Ca4= 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=YaPaegVb; 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-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 4Tk5XL25Xkz7Km; Mon, 26 Feb 2024 17:23:46 +0100 (CET) Received: from unknown by smtp-4-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4Tk5XK57h5zsTl; Mon, 26 Feb 2024 17:23:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1708964626; bh=lzn0jtPveq2aZBuWKiD3pKlsYwgBRJ4U7D5p8D9Xa9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YaPaegVb2VeR9n1J0G87joTNxA5lTSCmCLy4PBAVLu7Lqt12AqXXskAoqUqMEE+hT XBVmzYf44ndBNqzZ/DtYwaTTZ/LFBed7UNWO5ng4R6qBVTShDC5haaNxsDTSXr3lnC gRrSEET6p6I/quv+GrYOb4tdGkjEmqDxv9JQaQ0s= From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: Jakub Kicinski , Kees Cook , Shuah Khan , davem@davemloft.net Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , =?UTF-8?q?G=C3=BCnther=20Noack?= , 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: [PATCH 1/2] selftests/landlock: Redefine TEST_F() as TEST_F_FORK() Date: Mon, 26 Feb 2024 17:23:34 +0100 Message-ID: <20240226162335.3532920-2-mic@digikod.net> In-Reply-To: <20240226162335.3532920-1-mic@digikod.net> References: <20240223160259.22c61d1e@kernel.org> <20240226162335.3532920-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 This has the effect of creating a new test process for either TEST_F() or TEST_F_FORK(), which doesn't change tests but will ease potential backports. See next commit for the TEST_F_FORK() merge into TEST_F(). Cc: Günther Noack Cc: Jakub Kicinski Cc: Kees Cook Cc: Shuah Khan Cc: Will Drewry Signed-off-by: Mickaël Salaün --- tools/testing/selftests/landlock/common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/landlock/common.h b/tools/testing/selftests/landlock/common.h index 425c5698aea2..0bc15d36971a 100644 --- a/tools/testing/selftests/landlock/common.h +++ b/tools/testing/selftests/landlock/common.h @@ -37,7 +37,7 @@ struct __test_metadata *_metadata, \ FIXTURE_DATA(fixture_name) *self, \ const FIXTURE_VARIANT(fixture_name) *variant); \ - TEST_F(fixture_name, test_name) \ + __TEST_F_IMPL(fixture_name, test_name, -1, TEST_TIMEOUT_DEFAULT) \ { \ int status; \ const pid_t child = fork(); \ @@ -80,6 +80,10 @@ __attribute__((unused)) *variant) /* clang-format on */ +/* Makes backporting easier. */ +#undef TEST_F +#define TEST_F(fixture_name, test_name) TEST_F_FORK(fixture_name, test_name) + #ifndef landlock_create_ruleset static inline int landlock_create_ruleset(const struct landlock_ruleset_attr *const attr, -- 2.44.0