Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1414599lqm; Thu, 2 May 2024 14:13:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXgcgFSszCChw1L4ALbi6fERMgsnT356ETXavfNzD1pG4kW8NcMeoyxIGWFcaixmxE6k9SaKA9mNQSKnVyeTZCkyImZ0q6CNdST5CQiiA== X-Google-Smtp-Source: AGHT+IGhsW9at0k9/iK5ljhymTSOE/y/d3idVT13qQscFzrHLFfae9sW0kRKuVgkznVB5jeiH57j X-Received: by 2002:a05:6a20:da8b:b0:1a7:2ceb:e874 with SMTP id iy11-20020a056a20da8b00b001a72cebe874mr1066871pzb.37.1714684421967; Thu, 02 May 2024 14:13:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714684421; cv=pass; d=google.com; s=arc-20160816; b=M/2cAd8Jg/b8v0gvv2rVK4mdcFj4dV/8P9KTWCQ5GG2Se6kt2Az1fRqvoAvQoqCcxh gJB74n5EG06tp4mkkfhPNGUBPXAINJfkXOsEPygCQW0gCy55JjhRR5eRGnBwousaheGl xUBaVJ3AAGEznSfuHXRQnjs8byZ05b5svk23ZfxdOC/TqN+kc604J7uqxFK7CNdzJCD0 l0VhYLJdd2hGSIslyYSsbSDcKavwoGsDVd3ozlsb77b6fpleHbbNjG6J7p7X90d7724n kGkMt+xTB+8x/c1HtxGP4Zj77HrWBpoFmjVzSFy5gvW2/U7I2ljjkbL0IuUEuXonesHl F7rg== 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=65AeXo3u2GB4qCrapUYaZU0GBoAC/RWHN54hmDhLOXk=; fh=DyJwEPHty4QZ77xuwgmyonrTSVvlIRI2bkR/2kTqG9Q=; b=T98zgJIAJnopFBvEJt3WY86dIollwDMUggafLuizfXTBnEvlLNbcPpazMWqRRTDvOb 9fOQrstz/m8xl3JpB8UaD620o3SaToFb4Ij4AXDaRCExx8LHHqL1lBLIKnaNJjo6kfLd y1bwJV9nLgee9AXmeSI0NTPeohcA6Gknr3eUL5i26TDMwwYVj+96lfvICDaiZLuC/sbh SBCqpQ3+08FSAktjTTocWNEx+IsdXuZxq6Aysr+WDg8mojyY9zy9vHwLkRjogBN+xZ2l xQTauJnnVN+PH2kBmvzkX41NX/0hak3nyvGmklQ+NHJCI/eOyPNzH9DBcq0tamKA+09z YV0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=Uv4gdnJ3; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-166920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166920-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ld9-20020a056a004f8900b006e6c056f450si1752872pfb.213.2024.05.02.14.13.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 14:13:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=Uv4gdnJ3; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-166920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166920-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BDB88B22D45 for ; Thu, 2 May 2024 21:11:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55FDE1C6606; Thu, 2 May 2024 21:09:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="Uv4gdnJ3" Received: from smtp-190e.mail.infomaniak.ch (smtp-190e.mail.infomaniak.ch [185.125.25.14]) (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 63C61181B8D for ; Thu, 2 May 2024 21:09:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.25.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714684196; cv=none; b=qfJB6ziwIo9VBky3rwyUBDULzOU8GrP8Ve1SVNdqiciclDCsXU3qje6sfOYRPs4rAqH/d7j+86saHUxMx5SUW7JSzNlhOHDWZIl+UBo0rL0ATQRQ4H5Ll6XdFYBhvWSqA5ThdAJfal408Cyv5YXinAYcJiFWLKKoj5181sKbLHk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714684196; c=relaxed/simple; bh=az9zR1I5qxRjcteW1qetSFlOKHg+o9ve4pPybdRPw6E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cOvUFymiCrnL8/WfC1ThRyt/CqiTRfFwV3I9eCLwTNU3WoJCONDBtouwGGTN0fW8p+AzZ+hQq9ZRMYLdTik1rIXJMsM21OiziECCstcmQ3iETtTKfYvmaDThzMyoL89V2olgZHXGnm+Eu1YNuEK0WoKm8o5lTW6tzFrCuZsYZ2Y= 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=Uv4gdnJ3; arc=none smtp.client-ip=185.125.25.14 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-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VVmlv04ZPzNNf; Thu, 2 May 2024 23:09:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1714684186; bh=az9zR1I5qxRjcteW1qetSFlOKHg+o9ve4pPybdRPw6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uv4gdnJ3WUerzih5lRzuwnJrsLP1Mpvv9mzgAnCrZl1Ej955qJtiKGyrfW2mL7+3Y kTMXx0GOEMH2tUAUMnAB0dkdAs7q3v7Nd9KA9eCYUaIaj/M9m5NPynmRf8XeqrBoU/ kk6SdWZRE5fImjNgvFS3qSuOyPbHH3HyQHfyN87A= Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VVmlt3Bw0zLNh; Thu, 2 May 2024 23:09:46 +0200 (CEST) From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: Christian Brauner , Jakub Kicinski , Kees Cook , Mark Brown , Sean Christopherson , Shengyu Li , Shuah Khan Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , "David S . Miller" , =?UTF-8?q?G=C3=BCnther=20Noack?= , Will Drewry , kernel test robot , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan Subject: [PATCH v4 06/10] selftests/harness: Constify fixture variants Date: Thu, 2 May 2024 23:09:22 +0200 Message-ID: <20240502210926.145539-7-mic@digikod.net> In-Reply-To: <20240502210926.145539-1-mic@digikod.net> References: <20240502210926.145539-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/20240502210926.145539-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