[<prev] [next>] [day] [month] [year] [list]
Message-ID: <61813964-8f3e-87b0-4124-4566a7f9c86e@tronnes.org>
Date: Sat, 15 Oct 2022 18:58:24 +0200
From: Noralf Trønnes <noralf@...nnes.org>
To: Maxime Ripard <maxime@...no.tech>,
Karol Herbst <kherbst@...hat.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
Daniel Vetter <daniel@...ll.ch>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
David Airlie <airlied@...ux.ie>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Lyude Paul <lyude@...hat.com>,
Maxime Ripard <mripard@...nel.org>,
Emma Anholt <emma@...olt.net>, Chen-Yu Tsai <wens@...e.org>,
Samuel Holland <samuel@...lland.org>,
Ben Skeggs <bskeggs@...hat.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Jernej Skrabec <jernej.skrabec@...il.com>
Cc: Dom Cobley <dom@...pberrypi.com>, linux-sunxi@...ts.linux.dev,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
nouveau@...ts.freedesktop.org,
Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-arm-kernel@...ts.infradead.org,
Mateusz Kwiatkowski <kfyatek+publicgit@...il.com>,
dri-devel@...ts.freedesktop.org,
Hans de Goede <hdegoede@...hat.com>,
Phil Elwell <phil@...pberrypi.com>,
Noralf Trønnes <noralf@...nnes.org>
Subject: Re: [PATCH v5 07/22] drm/client: Add some tests for
drm_connector_pick_cmdline_mode()
Den 13.10.2022 15.18, skrev Maxime Ripard:
> 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 <maxime@...no.tech>
>
> ---
> Changes in v5:
> - Removed useless (for now) count and modes intermediate variables in
> get_modes
> - Switched to kunit assertions in test init, and to KUNIT_ASSERT_NOT_NULL
> instead of KUNIT_ASSERT_PTR_NE(..., NULL)
>
> Changes in v4:
> - Removed MODULE macros
> ---
> drivers/gpu/drm/drm_client_modeset.c | 4 +
> drivers/gpu/drm/tests/drm_client_modeset_test.c | 99 +++++++++++++++++++++++++
> 2 files changed, 103 insertions(+)
>
> 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
I can't say I like including the file like this, but exporting the
static function for testing isn't attractive either and doing it like
this is shown in the kunit docs, so:
Acked-by: Noralf Trønnes <noralf@...nnes.org>
Powered by blists - more mailing lists