Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1348357lqa; Mon, 29 Apr 2024 06:17:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWe3eAex5C/5T739q6vpJBPQ0kY8yl3FVqpGwpgQmDRlC7b9BX4ds6YYq95swxjjSGCe244/Y8qC/DOFIkh/Jcce+DyLOkl5ijAOOf0MA== X-Google-Smtp-Source: AGHT+IGgS5zn0IQDMM3/BiV9AMMu5Y8jkEEzikRJuukSjUTTNX/EbKik6pkrScV2Y7QOP8diyidh X-Received: by 2002:a05:6a20:8414:b0:1a3:ae75:d6f5 with SMTP id c20-20020a056a20841400b001a3ae75d6f5mr13746046pzd.20.1714396629168; Mon, 29 Apr 2024 06:17:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714396629; cv=pass; d=google.com; s=arc-20160816; b=MERIF9YvNfU5wwM+4MVcesf0e04+MaWCsbqcZrNWo1XGsjY/xrZL96B1FXdvsrHlR7 qDPePENV3CZSyFqnwoEKlV0RRy2oHcrFETTXX+3/WK+Zo/jtGernvUXHfDJGmZGCsdkg T/lRaPS96E4f5lRUHXhPrWZyR11VdGUqfWu8JXZhN1st7lVw7fG9KtwpKKfcwq8P2tmA ptnOnWfCFSiycCqF8UrxnnPcLl69EIlScQ+Lg5BIoFTWuY/iVJ4WDcQBx2q5e//qe+6q Ze4jBmx5P+005jE7g05+dppd1zP8WVZ6QQFiVWrJuA3AWSUNgJugKXr+3peGfN04o4PS mV5Q== 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=FUdKc3nDKWEaP5a8djIzr1HAfv+MK8GxUgqVEDfHlVU=; fh=T/ngxZ/rchirObc+ozpAMGxUCKvTk1uHXxRS2gfk1OI=; b=sPuL7b/UcQhQ0b4uHJ6/hIPZaKp8Ny1rb3Jp77AjwllKZRl2TM62oXCVdIjmlSaDuH DxfkEIlqgnYEaInVC0WzTQPifnXUk+lrn+hET0LP8R0fo9aSS6s0PPTxjS4ez27PEuVG jzCKy/W7H3STD1mjHA+Doq669J7tu7QPOnsJSfkIBtMerny+qw3V+4SyRzFuU3CKR5+W 2Ec3XaPHEE9vH7PbjrXEcpFnsCzuJ5FxdhMlNMwk5s9VzxZB9yBD4NJ1xNh29O4rpF7F dZ+Cakb7VRQuyxXRHqPDLWjdZVsB1aB5ibNnQMTpkRgVSbgmyhoXcDnimZIy9rnH289P DBDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=qNsnniR9; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-162330-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162330-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 ko9-20020a056a00460900b006eaba823300si20271898pfb.307.2024.04.29.06.17.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 06:17:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162330-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=qNsnniR9; arc=pass (i=1 spf=pass spfdomain=digikod.net dkim=pass dkdomain=digikod.net); spf=pass (google.com: domain of linux-kernel+bounces-162330-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162330-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 E368C288AAC for ; Mon, 29 Apr 2024 13:10:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D16670CCC; Mon, 29 Apr 2024 13:09:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="qNsnniR9" Received: from smtp-190b.mail.infomaniak.ch (smtp-190b.mail.infomaniak.ch [185.125.25.11]) (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 7881F481C7 for ; Mon, 29 Apr 2024 13:09:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.25.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714396189; cv=none; b=TmAsZSfFsWlHEgkhqfLammbM2lsQwihNKdGkjMTxcjNw8eRJ7mcmYA98PUxZ3+9nuLk9ilpDQJJ8sIE4nvTrRLsSOI5/P7XySBzqMe0untjVL+bQFs966M5ytQYkYeXPEXCHOOaWjGl/QPgdhrEIRok0Db34sbCDUrpNYSqNEow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714396189; c=relaxed/simple; bh=G/CFiEQPBLvZ7poYbqwJYJrPoOi67Om8bQiF65fhYdE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tWImuc1gOabYG631rKuccYEU3Rj4K4+zCVacT7skLnxNuq9cE4FSzzdUEVPfJMzu+fWxQc+/FX4ra1AUUfQ4puMeMLlBh+aTcIkXbaNt3GExch0jGzVqoEsfA2kQ7g8vVRe4Q52JHx4gOBRVXNfDHPpviWX0H3OkNeOiJWMpO3w= 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=qNsnniR9; arc=none smtp.client-ip=185.125.25.11 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-0000.mail.infomaniak.ch (smtp-3-0000.mail.infomaniak.ch [10.4.36.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VSkFN68rjzGFv; Mon, 29 Apr 2024 15:09:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1714396184; bh=G/CFiEQPBLvZ7poYbqwJYJrPoOi67Om8bQiF65fhYdE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qNsnniR953gMqqy/QjZcRxJ/zpeDoqtVqnrBv5GqYHGegNMoR/VMywB9jq5ieOAKc KcD2cPMTIEI/gqQvK3fzZkJ41ORVIm9ljAUsKK6uWVOCffESElznBFqHWtwsJW+Qdr bBbKRkPepYGoc74WNu20lrvDi8ZK5R7Sd/v9yDpI= Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VSkFN1zrkzdKB; Mon, 29 Apr 2024 15:09:44 +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 v2 6/9] selftests/harness: Constify fixture variants Date: Mon, 29 Apr 2024 15:09:28 +0200 Message-ID: <20240429130931.2394118-7-mic@digikod.net> In-Reply-To: <20240429130931.2394118-1-mic@digikod.net> References: <20240429130931.2394118-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: Kees Cook Cc: Shuah Khan Cc: Will Drewry Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20240429130931.2394118-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 9f04638707ae..8a7d899a75e0 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -338,7 +338,7 @@ static pid_t __attribute__((__unused__)) 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 pid_t __attribute__((__unused__)) 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