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]
Message-ID: <CABVgOSmNroVNyLMdaU3b77G=HRgS9J6hvx9UWAyA28P_kZuONw@mail.gmail.com>
Date:   Sat, 16 Jul 2022 17:32:42 +0800
From:   David Gow <davidgow@...gle.com>
To:     José Expósito <jose.exposito89@...il.com>
Cc:     Javier Martinez Canillas <javierm@...hat.com>,
        Daniel Latypov <dlatypov@...gle.com>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Maxime Ripard <mripard@...nel.org>,
        Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...ux.ie>,
        maarten.lankhorst@...ux.intel.com,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Maíra Canal <maira.canal@....br>,
        Isabella Basso <isabbasso@...eup.net>, magalilemes00@...il.com,
        tales.aparecida@...il.com, dri-devel@...ts.freedesktop.org,
        KUnit Development <kunit-dev@...glegroups.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/4] drm/format-helper: Rename test cases to make them
 more generic

On Sat, Jul 9, 2022 at 7:58 PM José Expósito <jose.exposito89@...il.com> wrote:
>
> The tests available at the moment only check the conversion from
> XRGB8888 to RGB332. However, more conversions will be tested in the
> future.
>
> In order to make the struct and functions present in the tests more
> generic, rename xrgb8888_to_rgb332_* to convert_xrgb8888_*.
>
> Tested-by: Tales L. Aparecida <tales.aparecida@...il.com>
> Acked-by: Thomas Zimmermann <tzimmermann@...e.de>
> Signed-off-by: José Expósito <jose.exposito89@...il.com>
> ---

Looks good to me from the KUnit point of view.

Reviewed-by: David Gow <davidgow@...gle.com>

Cheers,
-- David


>  drivers/gpu/drm/tests/drm_format_helper_test.c | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
> index 4d074c2e48bf..f66aaa0e52c9 100644
> --- a/drivers/gpu/drm/tests/drm_format_helper_test.c
> +++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
> @@ -16,7 +16,7 @@
>
>  #define TEST_BUF_SIZE 50
>
> -struct xrgb8888_to_rgb332_case {
> +struct convert_xrgb8888_case {
>         const char *name;
>         unsigned int pitch;
>         unsigned int dst_pitch;
> @@ -25,7 +25,7 @@ struct xrgb8888_to_rgb332_case {
>         const u8 expected[4 * TEST_BUF_SIZE];
>  };
>
> -static struct xrgb8888_to_rgb332_case xrgb8888_to_rgb332_cases[] = {
> +static struct convert_xrgb8888_case convert_xrgb8888_cases[] = {
>         {
>                 .name = "single_pixel_source_buffer",
>                 .pitch = 1 * 4,
> @@ -126,18 +126,18 @@ static u32 *le32buf_to_cpu(struct kunit *test, const u32 *buf, size_t buf_size)
>         return dst;
>  }
>
> -static void xrgb8888_to_rgb332_case_desc(struct xrgb8888_to_rgb332_case *t,
> -                                        char *desc)
> +static void convert_xrgb8888_case_desc(struct convert_xrgb8888_case *t,
> +                                      char *desc)
>  {
>         strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
>  }
>
> -KUNIT_ARRAY_PARAM(xrgb8888_to_rgb332, xrgb8888_to_rgb332_cases,
> -                 xrgb8888_to_rgb332_case_desc);
> +KUNIT_ARRAY_PARAM(convert_xrgb8888, convert_xrgb8888_cases,
> +                 convert_xrgb8888_case_desc);
>
>  static void xrgb8888_to_rgb332_test(struct kunit *test)
>  {
> -       const struct xrgb8888_to_rgb332_case *params = test->param_value;
> +       const struct convert_xrgb8888_case *params = test->param_value;
>         size_t dst_size;
>         __u8 *dst = NULL;
>         __u32 *src = NULL;
> @@ -163,8 +163,7 @@ static void xrgb8888_to_rgb332_test(struct kunit *test)
>  }
>
>  static struct kunit_case drm_format_helper_test_cases[] = {
> -       KUNIT_CASE_PARAM(xrgb8888_to_rgb332_test,
> -                        xrgb8888_to_rgb332_gen_params),
> +       KUNIT_CASE_PARAM(xrgb8888_to_rgb332_test, convert_xrgb8888_gen_params),
>         {}
>  };
>
> --
> 2.25.1
>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4003 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ