[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGS_qxoWTo+TqAMOaoD=XEQhFp0K0QN4LS4XRQxFR9aTv=XmfA@mail.gmail.com>
Date: Tue, 31 May 2022 13:42:36 -0700
From: Daniel Latypov <dlatypov@...gle.com>
To: José Expósito <jose.exposito89@...il.com>
Cc: Maxime Ripard <maxime@...no.tech>, kunit-dev@...glegroups.com,
javierm@...hat.com, tzimmermann@...e.de,
maarten.lankhorst@...ux.intel.com, airlied@...ux.ie,
daniel@...ll.ch, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()
On Tue, May 31, 2022 at 11:45 AM José Expósito
<jose.exposito89@...il.com> wrote:
> >
> > From above, a)
> > Specifically here, it'd be encouraged to instead do
> > depends on DRM && KUNIT=y && DRM_KMS_HELPER
>
> My first attempt was to go with:
>
> depends on KUNIT=y && DRM && DRM_KMS_HELPER
>
> However, when I try to run the tests I get this error:
>
> $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm --arch=x86_64
> Regenerating .config ...
> Populating config with:
> $ make ARCH=x86_64 olddefconfig O=.kunit
> ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config.
> This is probably due to unsatisfied dependencies.
> Missing: CONFIG_DRM_KMS_HELPER=y, CONFIG_DRM_FORMAR_HELPER_TEST=y
>
> I wasn't able to figure out why that was happening, so I decided to use
> "select", which seems to solve the problem.
>
> Do you know why this could be happening?
Ah, you should probably ignore my suggestion then.
Looking at the Kconfig file, it's defined as
config DRM_KMS_HELPER
tristate
depends on DRM
help
CRTC helpers for KMS drivers.
Notably, the config lacks a description string.
IIUC, this makes it a "hidden" kconfig option, i.e. you can't directly
select it yourself in a .config, it must be selected by another
kconfig option.
E.g. you can try selecting it manually and see it fail via:
$ ./tools/testing/kunit/kunit.py config --arch=x86_64
--kconfig_add=CONFIG_DRM=y --kconfig_add=CONFIG_DRM_KMS_HELPER=y
...
Missing: CONFIG_DRM_KMS_HELPER=y
So having the test select it makes the most sense, unless there's a
better kconfig option to automatically select it (I have no idea,
someone with knowledge of the DRM code might though).
Daniel
Powered by blists - more mailing lists