Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp20023lqh; Mon, 6 May 2024 09:58:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXvnuKkJzU96ZhthLG2rpygYN95pmNgevpKJU98wI1oRlEMIqslYYT96Ury8EbweD5jjWO1abdi1/4JwpwYIYESrRr7X9j5fQzDADsfEQ== X-Google-Smtp-Source: AGHT+IHAQSia4D8NtFlmSaKFquPeblStsqlA4zAdKvnUFDzjForRAjPYvp1W42+E+Cas/G+JdQOs X-Received: by 2002:a17:903:1c9:b0:1e6:34f9:f766 with SMTP id e9-20020a17090301c900b001e634f9f766mr10278084plh.57.1715014691742; Mon, 06 May 2024 09:58:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715014691; cv=pass; d=google.com; s=arc-20160816; b=mtqTXEKpqWmCnxKClNgwD6xAYHIZ92dSMO+omRTS/vbstH78Ufy/8PIU+cLJOxNHoL 00GGp2SUOdIpwY8Bq63vE2ri0LM98tB7jNNOLESso6iNyNQwylr+cKN0SEeX3NG5nHYm hmYvAxF1G3+dxn0CZzllTDALxnq9fGFGTtDtiTgwcVUP40Daw0SNqKozebakBUuhMrlF 9lgNG2aeUbTxqBur1/D/G5+CuFCNZFF4jka6yEFlj7pLp6fJ4k+b23tIilnTzOAsjr6K vz/CcQp7O9r1228Jqstzt/tOokDo7ljSMbFh6fm7U+A5Rx8e4t1MGIcGB6f7bvbnpSme pMHg== 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=Kz9+ZyUPVwIgY5WjIkcJ5nogYaKZm+Sks9KxnIiTxLU=; fh=h2xHIZSGiUwuZyladnT9pE6uX086qy42ByZk41PjzSs=; b=b/FJ1tzIEYcv1r/sgNSbJ4mF/rD5Obv3Tqf8V9xC4KcTo5Hhad6AbxzzMXI44VAdRg piz+btw0drRYnqd/o+DdgpE82sCNQn80eekPCF4hNBvV9gQMnrJkYJvf9SgERLxLA2Zm KSy3MHWJ9Bgce9ToTOd7C6cTIm/iPO3lNuAImRhlchmdx3SP3gXpILr2qAlLV7bsQtHI 5EkN9ZbOoGLDHNHik7ud83fGRcUO3Iw9dYvVn/BDuqrpNi4aScq6Z4/A2Q7meLGJ4ElO N2kyHc2Po8PnImHpbjl15XgtyzIhzIFDXtSeEg3F8IZmyo3VElrqmtNsjs+U+7P/300h 2odw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=mH9UM3o3; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-170204-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170204-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 n12-20020a170902d2cc00b001e3c8b7e39dsi8563479plc.227.2024.05.06.09.58.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 09:58:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170204-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=mH9UM3o3; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-170204-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170204-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 500B4284DDD for ; Mon, 6 May 2024 16:58:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B4D015991A; Mon, 6 May 2024 16:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="mH9UM3o3" Received: from smtp-42af.mail.infomaniak.ch (smtp-42af.mail.infomaniak.ch [84.16.66.175]) (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 8232C159574 for ; Mon, 6 May 2024 16:55:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=84.16.66.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715014540; cv=none; b=utkqX9rSivndTyZydF9uZQeiXkzqRfMh+ZbMx6eLqpMB1Nq4h4gC2U/BZgWCf+S6+qxTfzAuTMNjeAvem2Ei4MTr1q03ntImD4ViMqvD9yvvn0sPh6Env2FEhvWcOCUAePA4qFdQ7+u1alm+5rjsQctpg0hTifmjTcXMtFrgEbM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715014540; c=relaxed/simple; bh=M+4DqDM3bMKzKflXmIXwGit406HlC3CP4E1NiL2yHkM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Idb2VIO2IJ7LszNSUPQBtrhzgq8ljPv3v0FAvrgBzlNjCtfYBAEk7AHKKn6Vg/9Hnpt6f389GPcJPZJ3e+UrpbxXXLvujXdvHFnUkklA1Z56ibFZ3rYpiiQyP9xN8P6xGFbedm7nagenFvQ4TsiMWLWHcLaZBMDz0n3iZ1uw6co= 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=mH9UM3o3; arc=none smtp.client-ip=84.16.66.175 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-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VY6wf5MS1z7K4; Mon, 6 May 2024 18:55:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1715014530; bh=M+4DqDM3bMKzKflXmIXwGit406HlC3CP4E1NiL2yHkM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mH9UM3o3Aer2h1akA3RvMN6jYBExqH/SwyzbOn6Ru4PVugDLIQxL7fbM83DagRANa fiOcHvgRu7RwXUp5Ugl4py+RGFy7zto96rbOFUC9DHpMJFnFjpHAyh8AYVmsBn3Ama jlm3yGIKemaW0vHOiaQ//Ux4mScpJwmLXIS1g52M= Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VY6wd6tx7zQ3W; Mon, 6 May 2024 18:55:29 +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 v6 06/10] selftests/harness: Constify fixture variants Date: Mon, 6 May 2024 18:55:14 +0200 Message-ID: <20240506165518.474504-7-mic@digikod.net> In-Reply-To: <20240506165518.474504-1-mic@digikod.net> References: <20240506165518.474504-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 FIXTURE_VARIANT_ADD() types are passed as const pointers to FIXTURE_TEARDOWN(). Make that explicit by constifying the variants declarations. Cc: Shuah Khan Cc: Will Drewry Reviewed-by: Kees Cook Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20240506165518.474504-7-mic@digikod.net --- Changes since v1: * Extract change from a bigger patch (suggested by Kees). --- tools/testing/selftests/kselftest_harness.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 9d7178a71c2c..201040207c85 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -338,7 +338,7 @@ static inline pid_t clone3_vfork(void) * variant. */ #define FIXTURE_VARIANT_ADD(fixture_name, variant_name) \ - extern FIXTURE_VARIANT(fixture_name) \ + extern const FIXTURE_VARIANT(fixture_name) \ _##fixture_name##_##variant_name##_variant; \ static struct __fixture_variant_metadata \ _##fixture_name##_##variant_name##_object = \ @@ -350,7 +350,7 @@ static inline pid_t clone3_vfork(void) __register_fixture_variant(&_##fixture_name##_fixture_object, \ &_##fixture_name##_##variant_name##_object); \ } \ - FIXTURE_VARIANT(fixture_name) \ + const FIXTURE_VARIANT(fixture_name) \ _##fixture_name##_##variant_name##_variant = /** -- 2.45.0