Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1170940lqo; Sat, 11 May 2024 10:15:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXNNFLuYb+JumuUp2Rprfic9Hyk/qcX5WT62edJTt3rkCK01YIA65wYT/n64qMyHzJw9N9/VoucyocSXwaxGP+ORuOariCRDn6+zmf38Q== X-Google-Smtp-Source: AGHT+IEIzPgte5/Zj/Ykjv4Aoxj5sYMkmFD46AkkMqbjRbb++80tkftRM7s98xqFInGs8xo1ZchY X-Received: by 2002:a17:902:b215:b0:1ea:dcd9:478 with SMTP id d9443c01a7336-1ef43d2ee65mr54473815ad.34.1715447731704; Sat, 11 May 2024 10:15:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715447731; cv=pass; d=google.com; s=arc-20160816; b=rNFVKF5Bi/5SThNExUTOAj+vimdDj1ESu6gir9a9GbMNpMLCSGALk2G/HRE5GfAPoz 9+2WHWhS002GQGxFdLqOoaBhTFXtLSD28RFinh6PRgLYKl0QyoVhVFpJxO+waWfMzqIS Jfx4hD+7eBvwPIaSAGESxnav+jAsdiRP3j728tcla0n4gQ2SeT5+Yo3h0ms1n2C6mGKa quvqMfdXX4atk2Q99HD+wni5Ml7LE8npur/cyzCjTfJmjA+yBx6SZGbLh4s1wnqIaNDN DfKY+k8qqxubDHJ0YvXBSckZYakFVcNxfI/K1/N4JjcMzPyJ7K3/Q4ej6ecixkgQuYEH 3u6g== 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=olnCKZ/f1+rGHwst2IyLMVXJF0OZbL9TePTxid+W8KM=; fh=h2xHIZSGiUwuZyladnT9pE6uX086qy42ByZk41PjzSs=; b=swOrmDfJi/09sdI9x8WNV+4x4znjwWtXIYpY3FP9i0lUJ/9yjlQ1l1S1sodMC26bMo CR0qQqJryvrLbDN4GtpzGmUpVP006zpPsn5XylPbr7D1FPHHcmY1/Ge22rf8Ok5gy3Sv 73vD4l5cAvVLBqgOuAURh0OTqiouA2c/bANdVoQc8jXrJ/JBoiPWivxQhhKZe6SwyTIn xKNYeVoDVGhWtO03lIa0aj2GQ0OtkMZUV/k8yvphGn1JY8K6nrvewti09HRHxy77XvE3 KoAv2m3PxgBhLfVPiie9SitL5UxDJka+DAXhtL7ZJ6gPh17pEvP+C0hAv+ij3vlj4acG PMeQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=v0aCBwDD; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-176653-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176653-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bad7e30si56222175ad.167.2024.05.11.10.15.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 10:15:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176653-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=v0aCBwDD; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-176653-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176653-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 019942821EF for ; Sat, 11 May 2024 17:15:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C46F31EA91; Sat, 11 May 2024 17:15:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="v0aCBwDD" 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 8D8F81B800 for ; Sat, 11 May 2024 17:15:00 +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=1715447703; cv=none; b=B00JqaeyYmwnr85eGwVScRBPSqklCNH1W/zy/ZGIYHiQA1sLU+MCYi8fEOlLNBTWs1SZERG6EKoUCZcnLjlyWysWd4e66q47KsMp2b3bzb7Dm9oNEwXKjXsEo4tIT4gYjFUe7gvxegAoeNXiAwDQazTWjGkiv73pN0Oky6fWaY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715447703; c=relaxed/simple; bh=AhSOwC69hM3XlVIjsnSNM0G1yMqhIGrTPTpK23ca25c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=c1zYuUkbA2bL38VmnlLwg6R7HOMROJUfXIps0YRC/CrbJsd15oh+aKXmIXeT+P9KaAwMVkjLn8TSqKSS12KzkbSxI0OIXhw9mDG3H/H3XJiNSIgR/XCJJ/1dRQF4I3oYidB5bObHdXSk53JN4X5eWAn00szT61AnIBRLFBkOkmo= 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=v0aCBwDD; 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-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 4VcC6p6zbbzj2X; Sat, 11 May 2024 19:14:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digikod.net; s=20191114; t=1715447698; bh=olnCKZ/f1+rGHwst2IyLMVXJF0OZbL9TePTxid+W8KM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v0aCBwDDfrOK0t7ab95u87uh6DmHugSHxoso0UJ0C3NY8Hags0+yZG6SmgkUtU35u nigJEiH+AIW/8IWMVPV5RsRAOCPJsyxUSCeNiOopbJMgy/l39NLhsPmeib+vd8ZPf5 rp4tfpHe3ulEwt5xSEuMZVZiuooyVwU/crOKJXQk= Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VcC6p1DKpzTHD; Sat, 11 May 2024 19:14:58 +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 v7 06/10] selftests/harness: Constify fixture variants Date: Sat, 11 May 2024 19:14:41 +0200 Message-ID: <20240511171445.904356-7-mic@digikod.net> In-Reply-To: <20240511171445.904356-1-mic@digikod.net> References: <20240511171445.904356-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/20240511171445.904356-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