Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp861872rwb; Fri, 23 Sep 2022 05:16:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5R7YxhAcVCnDvloldRMgMZ5SBm8X3oWHGDDmKuQytcl5gUBfeBJyJtZ3p9IVvde/5KnQiZ X-Received: by 2002:a05:6402:289e:b0:456:c93d:8b43 with SMTP id eg30-20020a056402289e00b00456c93d8b43mr1991087edb.167.1663935413645; Fri, 23 Sep 2022 05:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663935413; cv=none; d=google.com; s=arc-20160816; b=F7A3aOXh8KHdHunCBPsUFY3UNsPcBeJ0j5S7HW/+9nIlgZTZu71f0AfCfBrpqbqHTr G1gMpfSMgSsnvkf97pwS6GUfN6ZFWTDrKhyaR85saCsi9oCHnHY6N7QpYolhFxmjkMX9 MVDN2aiMIl8ap9thv9LqcbOnVb7DA2i76R4L8IF88Kyee077Up3AABPm1qWHPyq7IXAE 3vEJAcKlqDyWjEmlgAK6EKzz43Boq0fgjyqHvgStSzI/spS2nMdXMDAJZUu4empju8DA eTJkFZmE3MGK+BYmlEz367ruHWDHRl+3fDbhaEL26Ql0iiD7XAd9e6BIMDwNdpVEutdO eFzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=Sq1M6Yjkuo4gKOCAzvPQX1qzGt5vo3MaHtSk5QZqis8=; b=TFR/yaPFut/0frbRqxWXGczfGE2cCoLJrpYofprFUo70/IzfvNkpjQql7gVuHQdtJi J28IjwZTs46MSu10NXM9OLqNqAnM/qsNqUCyvh7/mKlexJqim+RvhTIYBZRMuEFTHVpw 0itx2ryaM3irakLWpgSAwrjNIdHzxmhUklUBbRKIxiUzZUBuqDxzNFs4EgE5ANnAOpXH EPFk35qyRoYcfpOm976C+Hug81m4jofo3ujymwPVIF/9unTemsNT/O1NEbykt7AgJM5N iIgxGrG4fUKxubPsdgu9xpVWt0YYJyNYRGV0261N/eHFe/SBavLjDX03jnQSMW5hL6e7 2yQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bGKLUAv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g21-20020aa7d1d5000000b00445b19945desi6408774edp.304.2022.09.23.05.16.27; Fri, 23 Sep 2022 05:16:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bGKLUAv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231300AbiIWMG1 (ORCPT + 99 others); Fri, 23 Sep 2022 08:06:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231425AbiIWMEQ (ORCPT ); Fri, 23 Sep 2022 08:04:16 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FF892ED48 for ; Fri, 23 Sep 2022 04:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663934389; x=1695470389; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=YaUg750lJnggz6KWmfaPEF4rvlW5TvJZSCMSaU800rA=; b=bGKLUAv3RM4CScRs6oCBRHN7KODcnxOd2jUtFFqUv279OEUGdxLcDqM/ KZfDymiO9tWURARsrTmmx3vS/6JVko00U8VHF9WigBuryKp06FYuWJREg kMlQFj9q2uoxMXvafgAubSRNZGbIzp/RBzK4BohtYHlRccI6XpcRCVPJZ 8lSvbuD+UEVxCGvyQpxfKDit3N9mrUWl5mLib17gnm4PDGLEmSHtzqRUT MMAPZGzVNNrmG1khXPFNu2VM+HgBRUsmZt1LD/931VQ2f7bRcXY7S92W/ pt/D4s3W1W9APQPbUq+jrSegZUucWtmEku9AckZDbeR9NdGHMGTTdSzTm Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="280940884" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="280940884" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 04:59:49 -0700 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="865270599" Received: from armannov-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.61.93]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 04:59:42 -0700 From: Jani Nikula To: Maxime Ripard , Jernej Skrabec , Rodrigo Vivi , Ben Skeggs , David Airlie , Maxime Ripard , Joonas Lahtinen , Emma Anholt , Karol Herbst , Samuel Holland , Thomas Zimmermann , Daniel Vetter , Lyude Paul , Maarten Lankhorst , Tvrtko Ursulin , Chen-Yu Tsai Cc: Hans de Goede , nouveau@lists.freedesktop.org, Geert Uytterhoeven , Dave Stevenson , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Phil Elwell , intel-gfx@lists.freedesktop.org, Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Dom Cobley , linux-sunxi@lists.linux.dev, Maxime Ripard , Mateusz Kwiatkowski , dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2 13/33] drm/client: Add some tests for drm_connector_pick_cmdline_mode() In-Reply-To: <20220728-rpi-analog-tv-properties-v2-13-f733a0ed9f90@cerno.tech> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20220728-rpi-analog-tv-properties-v2-0-f733a0ed9f90@cerno.tech> <20220728-rpi-analog-tv-properties-v2-13-f733a0ed9f90@cerno.tech> Date: Fri, 23 Sep 2022 14:59:23 +0300 Message-ID: <875yhe47z8.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Sep 2022, Maxime Ripard wrote: > drm_connector_pick_cmdline_mode() is in charge of finding a proper > drm_display_mode from the definition we got in the video= command line > argument. > > Let's add some unit tests to make sure we're not getting any regressions > there. > > Signed-off-by: Maxime Ripard > > diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c > index bbc535cc50dd..d553e793e673 100644 > --- a/drivers/gpu/drm/drm_client_modeset.c > +++ b/drivers/gpu/drm/drm_client_modeset.c > @@ -1237,3 +1237,7 @@ int drm_client_modeset_dpms(struct drm_client_dev *client, int mode) > return ret; > } > EXPORT_SYMBOL(drm_client_modeset_dpms); > + > +#ifdef CONFIG_DRM_KUNIT_TEST > +#include "tests/drm_client_modeset_test.c" > +#endif > diff --git a/drivers/gpu/drm/tests/drm_client_modeset_test.c b/drivers/gpu/drm/tests/drm_client_modeset_test.c > new file mode 100644 > index 000000000000..46335de7bc6b > --- /dev/null > +++ b/drivers/gpu/drm/tests/drm_client_modeset_test.c [snip] > +MODULE_AUTHOR("Maxime Ripard "); > +MODULE_LICENSE("GPL"); I think these annotations are incompatible with including the unit test, and, in this case, affect drm.ko. And we'll have two kinds of tests, those that get built via tests/Makefile, and those that get included, like this one, which should not be mentioned in tests/Makefile. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center