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] [day] [month] [year] [list]
Date:   Mon, 6 Jun 2022 11:43:52 +0200
From:   José Expósito <jose.exposito89@...il.com>
To:     Javier Martinez Canillas <javierm@...hat.com>
Cc:     David Gow <davidgow@...gle.com>, tzimmermann@...e.de,
        maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        dri-devel@...ts.freedesktop.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Daniel Latypov <dlatypov@...gle.com>,
        KUnit Development <kunit-dev@...glegroups.com>
Subject: Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for
 drm_fb_xrgb8888_to_rgb332()

Hello everyone,

On Thu, Jun 02, 2022 at 07:21:28PM +0200, Javier Martinez Canillas wrote:
> Hello David,
> 
> On 6/2/22 19:07, David Gow wrote:
> > On Thu, Jun 2, 2022 at 9:27 AM Javier Martinez Canillas
> 
> [snip]
> 
> >>
> >> And doing that will also allow you to get rid of this, since just selecting
> >> CONFIG_DRM_KUNIT_TEST=y would be enough for the tests built and run by KUnit.
> >>
> > 
> > This is definitely something other KUnit tests (apparmor, elf, etc)
> > are doing, and it's generally fine. You do lose the ability to build
> > the tests as a separate module, though. (This is not usually a big
> > problem, but there are some cases where it's useful.)
> > 
> > That being said, I don't think 'select' is enough of a problem that
> > you should feel the need to refactor in this way just to avoid it.
> 
> Oh, yes I didn't want to imply that this was the main reason but just
> pointed out that wouldn't even be needed if done that way. And it is
> something that we want to do anyway IMO, since as mentioned it would
> allow to test the static functions, which are the majority the format
> helpers in that file.

Conversion functions alway call drm_fb_xfrm()/drm_fb_xfrm_toio() and
their *_line function. For example, drm_fb_xrgb8888_to_rgb332() calls
drm_fb_xfrm() and drm_fb_xrgb8888_to_rgb332_line().

The current tests already check that the *_line() function works as
expected. I'd like to test the high-level functions first and, if
required, go into more detail in the future. The refactor is pretty
easy, so I'd prefer to keep it as it is for the moment.

About the other changes suggested, I applied all of them over the
weekend. I'll send v1 of the patch to the mailing list including them
so we have an up to date code to comment on.

Thanks a lot for all of your comments and help,
José Expósito

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ