Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1820757rdb; Mon, 8 Jan 2024 11:11:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5gyLejJ+AbETTMTTXJmJst8IlkjNQGvO9oAyUkNgVxU7TYNCrpjqOsB8wPqDC7AFCFFBk X-Received: by 2002:aa7:881a:0:b0:6d9:b75e:ddc3 with SMTP id c26-20020aa7881a000000b006d9b75eddc3mr1706398pfo.33.1704741095472; Mon, 08 Jan 2024 11:11:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704741095; cv=none; d=google.com; s=arc-20160816; b=jjrp7MqwHbY/vcgW1e/IdBazgOlk3vLZs1WFY4aksfEiACb5R0P09dTUUQFZggh99Z GzKPUoHru4SwWfUovHAr6k+8M55c4sOhH9INQjVApWbiOtH/ZaWOcvyPl4xPD9vdkYz4 4bOuY8b2RjMwA2Q7URnr2EKv5GBj1n+eDf+c6aOQ3+pKDZBjAqSUUJLephMzJYIHvN8j YPsYw6Q7w28RzyuQBrApk2G8Bw9oJdJAvHkI0cQPbsJNT6PDesYbE12o1f/zOUVND1Sw rg052+CuXxT38yYKIBcYvDe4zbkAxqW6C6N9hc0Q6b/mHVrSEamOlcciFJhUcXrvkDx+ RL1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=4EmmYPfHAmsmGo3xTHgHNTrhUE8uvV5XpZ+RlsDi0Fk=; fh=mMvGNVyoxNR12CzNqgQF4TLbQbfLEJ4BNpOrIArhAP8=; b=CIBxtLpitVpKq+KEUJHrobkpZ6RJ/GZN+DFlsNcTnu/579Ej3C7tpV+70koY4RyTaz bW24i65CQfJFgXB8AFlmTHWvk60SUlo4Ide/7Ors8oAggVrzl8XrRIS7bgm9/ZanZTI/ OX85hKD+4UVGIRY8T9MCirDQqetfMf1IiqvPi4sx+qztYN1Lb31XBJULdhTYjVh3Uckx vrQdTq9zjj+MxWLK9hcF3F1npQvpy4GfUw83oOHDp68oS8BI8ZEesiI8c8MCSxP+3SbK b7OowUyt3pD48I5rJRiK+YTl6ovHdGz0xNj6BfZOrdSM4n7mBbs1DyQb7xNUqav7lZXE 5ZWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=infJdD5p; spf=pass (google.com: domain of linux-kernel+bounces-20010-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=riseup.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j3-20020aa79283000000b006daf91964e8si251262pfa.112.2024.01.08.11.11.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 11:11:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20010-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=@riseup.net header.s=squak header.b=infJdD5p; spf=pass (google.com: domain of linux-kernel+bounces-20010-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=riseup.net 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 654BAB217A6 for ; Mon, 8 Jan 2024 19:11:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC1D254FA5; Mon, 8 Jan 2024 19:11:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=riseup.net header.i=@riseup.net header.b="infJdD5p" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) (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 A206954F85; Mon, 8 Jan 2024 19:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riseup.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riseup.net Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4T83ZB0qJ2z9wqT; Mon, 8 Jan 2024 19:11:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1704741074; bh=BcZ3KVI53mstXqau6zectZz4RnmhY47xgMYJZN+ZIaQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=infJdD5p34mA9gKPvJptIjOzdbIfe9Hujjif438x1zRpCeP2wBWmtoAcqAHAmtZRD 9w7Xqc0zwSdpzlxCEYwJiFccWwGGOCclyO+ECrxq5anWS21fevSpvMz4Z/uAOFq2ul 7NNQLRs3Jt4dioKbYJv71J5E6QFXSAsWijtNImf4= X-Riseup-User-ID: 7573B3426939D883A3225FA69B0B75C911D2C11A815A2296FDD774F32314207C Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4T83Z46ZlrzFrsD; Mon, 8 Jan 2024 19:11:08 +0000 (UTC) Message-ID: <2737e91a-27dd-4c43-a678-47e041c42559@riseup.net> Date: Mon, 8 Jan 2024 16:11:05 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH 7/7] drm/vkms: Create KUnit tests for YUV conversions Content-Language: en-US To: Maxime Ripard Cc: Daniel Vetter , David Airlie , Haneen Mohammed , Harry Wentland , Jonathan Corbet , Maarten Lankhorst , =?UTF-8?Q?Ma=C3=ADra_Canal?= , Melissa Wen , Rodrigo Siqueira , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org References: <20240105-vkms-yuv-v1-0-34c4cd3455e0@riseup.net> <20240105-vkms-yuv-v1-7-34c4cd3455e0@riseup.net> <5z66ivuhfrzrnuzt6lwjfm5fuozxlgqsco3qb5rfzyf6mil5ms@2svqtlcncyjj> From: Arthur Grillo In-Reply-To: <5z66ivuhfrzrnuzt6lwjfm5fuozxlgqsco3qb5rfzyf6mil5ms@2svqtlcncyjj> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 08/01/24 07:15, Maxime Ripard wrote: > Hi Arthur, > > On Fri, Jan 05, 2024 at 01:35:08PM -0300, Arthur Grillo wrote: >> diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c >> index b654b6661a20..11df990a0fa9 100644 >> --- a/drivers/gpu/drm/vkms/vkms_formats.c >> +++ b/drivers/gpu/drm/vkms/vkms_formats.c >> @@ -440,3 +440,7 @@ void *get_pixel_write_function(u32 format) >> return NULL; >> } >> } >> + >> +#ifdef CONFIG_DRM_VKMS_KUNIT_TESTS >> +#include "tests/vkms_format_test.c" >> +#endif > > I assume this is due to testing a static function? Yeah, you're right. > > If so, the preferred way nowadays is to use EXPORT_SYMBOL_IF_KUNIT or > EXPORT_SYMBOL_FOR_TESTS_ONLY if it's DRM/KMS only. Oh, I didn't know about that. I think I will use EXPORT_SYMBOL_IF_KUNIT as you can use VISIBLE_IF_KUNIT to maintain the function static if the test is not used. ~Arthur Grillo > > Maxime