lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Sep 2022 10:18:01 +0200
From:   José Expósito <jose.exposito89@...il.com>
To:     Maxime Ripard <maxime@...no.tech>
Cc:     javierm@...hat.com, davidgow@...gle.com, dlatypov@...gle.com,
        tzimmermann@...e.de, daniel@...ll.ch, airlied@...ux.ie,
        maarten.lankhorst@...ux.intel.com, jani.nikula@...ux.intel.com,
        maira.canal@....br, isabbasso@...eup.net, magalilemes00@...il.com,
        tales.aparecida@...il.com, geert@...ux-m68k.org,
        dri-devel@...ts.freedesktop.org, kunit-dev@...glegroups.com,
        linux-kernel@...r.kernel.org,
        Maíra Canal <mairacanal@...eup.net>
Subject: Re: [PATCH v4 3/3] drm/format-helper: Add KUnit tests for
 drm_fb_xrgb8888_to_gray8()

Hi Maxime,

Thanks for looking into the patches.

On Mon, Sep 19, 2022 at 09:36:45AM +0200, Maxime Ripard wrote:
> Hi,
> 
> On Mon, Sep 19, 2022 at 09:15:31AM +0200, José Expósito wrote:
> > Extend the existing test cases to test the conversion from XRGB8888 to
> > grayscale.
> > 
> > Tested-by: Maíra Canal <mairacanal@...eup.net>
> > Reviewed-by: David Gow <davidgow@...gle.com>
> > Signed-off-by: José Expósito <jose.exposito89@...il.com>
> > ---
> >  .../gpu/drm/tests/drm_format_helper_test.c    | 62 +++++++++++++++++++
> >  1 file changed, 62 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
> > index 09d358b54da0..71722e828abe 100644
> > --- a/drivers/gpu/drm/tests/drm_format_helper_test.c
> > +++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
> > @@ -37,6 +37,11 @@ struct convert_to_xrgb2101010_result {
> >  	const u32 expected[TEST_BUF_SIZE];
> >  };
> >  
> > +struct convert_to_gray8_result {
> > +	unsigned int dst_pitch;
> > +	const u8 expected[TEST_BUF_SIZE];
> > +};
> > +
> >
> > [...]
> >
> >  static struct kunit_case drm_format_helper_test_cases[] = {
> >  	KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_rgb332, convert_xrgb8888_gen_params),
> >  	KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_rgb565, convert_xrgb8888_gen_params),
> >  	KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_rgb888_test, convert_xrgb8888_gen_params),
> >  	KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_xrgb2101010_test, convert_xrgb8888_gen_params),
> > +	KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_gray8_test, convert_xrgb8888_gen_params),
> 
> The trailing test feels redundant,

Why do you feel like it is redundant? Under the hood, most conversion
functions reuse the same code, but the *_line() function is unique and
I think that it is worth testing it.

> and we should order them
> alphabetically to avoid conflicts as much as possible.

Good point, I'll sort them alphabetically.

> Feel free to add my
> Acked-by: Maxime Ripard <maxime@...no.tech>
> 
> And fix this while applying
> 
> Maxime

Thanks!
Jose

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ