On Tue, May 31, 2022 at 11:45 AM José Expósito jose.exposito89@gmail.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