[PATCH 1/2] drm/tests: Split drm_framebuffer_create_test into parameterized tests
Michał Winiarski
michal.winiarski at intel.com
Wed Aug 31 10:49:41 UTC 2022
On Tue, Aug 30, 2022 at 06:16:02PM -0300, Maíra Canal wrote:
> The igt_check_drm_framebuffer_create is based on a loop that executes
> tests for all createbuffer_tests test cases. This could be better
> represented by parameterized tests, provided by KUnit.
>
> So, convert the igt_check_drm_framebuffer_create test into parameterized tests.
>
> Signed-off-by: Maíra Canal <mairacanal at riseup.net>
Now that we have separate testcases, we may also want to consider using .init
for mock_drm_device instead of a global
(see:
https://lore.kernel.org/dri-devel/20220117232259.180459-5-michal.winiarski@intel.com/
for reference)
Either way:
Reviewed-by: Michał Winiarski <michal.winiarski at intel.com>
-Michał
> ---
> drivers/gpu/drm/tests/drm_framebuffer_test.c | 23 +++++++++-----------
> 1 file changed, 10 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/tests/drm_framebuffer_test.c b/drivers/gpu/drm/tests/drm_framebuffer_test.c
> index ec7a08ba4056..3e46fd9f6615 100644
> --- a/drivers/gpu/drm/tests/drm_framebuffer_test.c
> +++ b/drivers/gpu/drm/tests/drm_framebuffer_test.c
> @@ -25,7 +25,7 @@ struct drm_framebuffer_test {
> const char *name;
> };
More information about the dri-devel
mailing list