Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1575032lqa; Mon, 29 Apr 2024 12:20:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPDyVuQ1C5YSQ8A4XQnHg9AMnohIv7YMtCFbtSlxu/856GZSeE7ZPtRH9JfipUtbuExJYvtlBixul3laywFbX/DTUbO8x3LalKBy9GgQ== X-Google-Smtp-Source: AGHT+IEMGsMcIb4W+RE+x/IbaxBmbUfXQ/FTOilnY97zpHIVBvZCvcura8Bl3ROrFu6WtTFjb9ez X-Received: by 2002:a05:6a20:a29c:b0:1a3:600b:444c with SMTP id a28-20020a056a20a29c00b001a3600b444cmr8759312pzl.36.1714418410699; Mon, 29 Apr 2024 12:20:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714418410; cv=pass; d=google.com; s=arc-20160816; b=uPa/wT6UagZAJbFnA/6QAUFARsjBNzwI6eS3oRkYxrWRjbJoWe7PyQ4Ybw8mJa0eyx zmO951wi4DmCACEDz2udu1eeGZJrSKHJc+GpkFQ6bwMz7Qaw5kks2b+5Zhx2Ih6x9tRc rQ/91kexfNZuQV+9cJNElj7cxOty7JuHKGhEuGSQwQX9do7aN9n4yLrBER6RucES0Ij/ 1hAXrGaqhGuMY1eFcFNzR1W28Us7v9Y1Cdj/DCmRaRpHYUlb7Vw+Yfkr3GgMfQOlrcSR 579T3IrdtnvEBLsjAxmM49keoAm+mlR5foZ4wojCZW8y30ZjGJXnF+lx/It4mwmo3kKl c44w== 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=BFmvHEaI2qpJ2iFxkS2ctlFjKLxW3Cqn8408NqEBiek=; fh=T/ngxZ/rchirObc+ozpAMGxUCKvTk1uHXxRS2gfk1OI=; b=C/uf1+W658vlq+5btWLMOqokABSYbb6RQjQ83PdlcWqaXIZkIVgS9OHOGSCcpBKguM JKu9r7lRExc11qYGtWA2Wj6lGOZakmuRzE36L0aTXU5NAX8EYdn9pyTgCg5rgBT7vBcK MQVyTeswGLLYUWs7BdjMYd+Bum+A/nIfGVbEBjArQAJ1Ukh6UxmlEajVnYRhGO/hGusc fMbmAPczP8slhdVUKUE8yH7+pfGo6c5kppb4P2W+c7NJr+iyaqp8yfchkCdxguhwAR76 W26wbi3t5mLKO+8s1bMucYpkAUPOkHwUGLY44p75iaZt1ADX52EKwhKW/GSbrI5Ag9IT c5Eg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=fKQrk2Im; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-162901-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162901-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 y2-20020a62b502000000b006ed5f660606si16406142pfe.212.2024.04.29.12.20.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 12:20:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162901-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=fKQrk2Im; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-162901-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162901-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 899A0B22669 for ; Mon, 29 Apr 2024 19:19:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D74F13C674; Mon, 29 Apr 2024 19:19:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="fKQrk2Im" Received: from smtp-1909.mail.infomaniak.ch (smtp-1909.mail.infomaniak.ch [185.125.25.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 8DBE113B5BB for ; Mon, 29 Apr 2024 19:19:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.25.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714418364; cv=none; b=c7O4UCGLcJnRcRdJyrA9Gqb78hBnq7ZT40IjckvUMV+9rNU0z/YrcfKwiWhJuKc9dsZCnpXG4fjA6MVWMQ1cu/27rbNYrGoQEwPQcDJOkZY+SeY31jkorhSpzDIgWtt+xwencEli+lAhXKfR7n18evcyayDII52x4qZWkCMTwdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714418364; c=relaxed/simple; bh=uYRGvx9QgMjraEBh6Deo58r6tKmJhaUGzDGdqMRxYwE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dDLswo7qBuP/+kTK+chLoaDzPlJlQHmQRMUi9AloZRnpTtKehR1fvhwgEPVc5nzdjVTZnd3i0QVeuYoiZ1ZzwtdGm8k5w8OD7l8QJ7zxbdrVfJtWixuR3wexaYQhy+Ouv4DLlcs1Uwcw3zcNLNixNnu7CjGqYB2uzEk7XsO2yv0= 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=fKQrk2Im; arc=none smtp.client-ip=185.125.25.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-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 4VStRr44jyzFqc; Mon, 29 Apr 2024 21:19:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1714418360; bh=uYRGvx9QgMjraEBh6Deo58r6tKmJhaUGzDGdqMRxYwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fKQrk2Imi9MMEt0AX5X1pIhN3efB6OBe6ctgdob5/GsAEFM8HroOT6eJWXwjO1HqL yRz4r8CNJsTow1dj8QerFOIR+eCTziOC4lqPpt7G7SPhsHvpmb82bEsEK2p0Nq9Bhv 620JEU+xOZv9IF1NZ2ql001NERVHGBmBgAGLp+BM= Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VStRq6Xq2zH0W; Mon, 29 Apr 2024 21:19:19 +0200 (CEST) From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: Christian Brauner , Jakub Kicinski , Kees Cook , Mark Brown , 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 , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan Subject: [PATCH v3 6/9] selftests/harness: Constify fixture variants Date: Mon, 29 Apr 2024 21:19:08 +0200 Message-ID: <20240429191911.2552580-7-mic@digikod.net> In-Reply-To: <20240429191911.2552580-1-mic@digikod.net> References: <20240429191911.2552580-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/20240429191911.2552580-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.44.0