Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1695585lqm; Fri, 3 May 2024 04:00:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQgm3QQwa9KXdjlaJ0je+YemLVgvGsa5h/7zrgeh19xpykKhdoPPg8mN8yv2hgK+y6onPWg+QVm6um6/JbvtaU1EUNo6tN4QkempUHYA== X-Google-Smtp-Source: AGHT+IFS/Sq7n0OXxHlKUV8xRVTT6Kp/RzL9Zscc3OKpUm3QULoUuj8NbxWRGsCdQ9Utl8k2XMoQ X-Received: by 2002:a05:6214:2523:b0:6a0:cb46:9e8 with SMTP id gg3-20020a056214252300b006a0cb4609e8mr2154495qvb.57.1714734002827; Fri, 03 May 2024 04:00:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714734002; cv=pass; d=google.com; s=arc-20160816; b=e8EBBqv7CD7B932WXRJcfI7KXbBrpHQmiOd39ybYg86zHRp6eOIIrQrkv4A8APN2sE P1Z5T34vUHiWW+KjKySEVXVyL1rWAtQ8dZaRvCHTLRr9tiVL1priJ4fRFAsHCPCZrJKE Qc7PG6abA3p58xnAzSUyzzcy/6PuTr+dAcUkNVzsUWgyC/o5q0sHISaXyfD98ang7wUd YngmxVw7EgvVlz3Qds2Tn5d2nRFHbDirDIyn0gLgf/t9SzydvcLgShI7nQEbT7CBZxZB isQgk/Y2GIyYPuWO43S7+DdL2AzLBHnfC/ivNZCTxQwywCx+YZuvFOSruhONIJa+8wmz /9NQ== 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=W3B5btV5iWHBtxovgVWBXWX4W4l/hgOpXoliIph1sM4=; fh=pFOGWyS68KwrsEZD3Ll2e7y6RwSNe0VchkTs/n9iysY=; b=cygyqFarbLtP+48xpBVliiAx0ZJTLJfKQs6WDL5WVc5C/KDXYjqrfSq8J2yQH2bk3j El0r02aJgSuNBoCX62vyG81ytqL4CpZF7O81FdRc1Jrq4KLHlqVG4I+yLTv4nRRFE6UD JzxQ+H/FPM+/O8fLD41kkWNmquy9MomCSMdIM3uJBigGaeuGm1O604o9QpeqehsyCuCN I1/0ltKtH1q4pz1XdpQCZ9o5j6OhCEQKoJGU66sbREBMT9Kvj0V4l8QP5gkgdZ40bw/m 7cTuNHBtzLr1cOdCEjj0NkDf+su4nT0V+gys8TV7SXO/e/0G35gYLNR++cAwbpZ0Hr+G fUVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=sKwdrCO8; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-167552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167552-linux.lists.archive=gmail.com@vger.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 gs3-20020a056214226300b006a0c91dbd86si2965503qvb.39.2024.05.03.04.00.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 04:00:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167552-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=@digikod.net header.s=20191114 header.b=sKwdrCO8; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-167552-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167552-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 8DCC51C220BC for ; Fri, 3 May 2024 11:00:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3744F154426; Fri, 3 May 2024 10:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="sKwdrCO8" Received: from smtp-42ac.mail.infomaniak.ch (smtp-42ac.mail.infomaniak.ch [84.16.66.172]) (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 6086A153517 for ; Fri, 3 May 2024 10:58:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=84.16.66.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714733921; cv=none; b=OSWr1MOvJjS/1BdlhHpvnLWWPkn9o2cVWTTPRxNXZPJ+ESWWvuphn8/wq6FvDP5zhOedH+4lgzfmgKKnfSbLY/kgh1MNaJzJ/a50QngodefhMInzAPaz6cpV8PFyXdhnNDqx7QEY0bvcC9rg/xPTHuMhiwGKgaMwlt2JB7TNvmM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714733921; c=relaxed/simple; bh=VIIfuvsoJUeCLZIYhwgJBbJh36D5Fneuyd9EauHv5U8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mTJZpTvFIZmTR60THyJ85LNn3oqsIHCnk6L+cU2uR6ywAC5l3wC+jL4uy2DpEGxn8j57B2kI4bN8OLg+F0pFBItV2C6cmmYSVBWy9hkaJZc66pEa1BXSuMUlq7hNSGhR7Ab2A73Z1kf1fzqiJE6aN0aDuvr5g+VLOX+JXMnWKRY= 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=sKwdrCO8; arc=none smtp.client-ip=84.16.66.172 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-3-0001.mail.infomaniak.ch (smtp-3-0001.mail.infomaniak.ch [10.4.36.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VW78F2df7zRxt; Fri, 3 May 2024 12:58:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1714733917; bh=VIIfuvsoJUeCLZIYhwgJBbJh36D5Fneuyd9EauHv5U8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sKwdrCO8UI5nYC4Nfkh5g9PYFG84eHS9PF5cJeWPTuemUtrmTnevZ0iJu9Wn4vy5G SYQPWK1+v2YM7pBheGumkYKy7ZX0I27kFvMPu73g4jmYsWFxdTlwu+PHmC7hXeM0iL trO1mk1zA9Y7KACzL7mjHWwE2Ya0VN16Yzv5Vj58= Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4VW78D52Gxzxyg; Fri, 3 May 2024 12:58:36 +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, netdev@vger.kernel.org, Shuah Khan Subject: [PATCH v5 06/10] selftests/harness: Constify fixture variants Date: Fri, 3 May 2024 12:58:16 +0200 Message-ID: <20240503105820.300927-7-mic@digikod.net> In-Reply-To: <20240503105820.300927-1-mic@digikod.net> References: <20240503105820.300927-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/20240503105820.300927-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