Re: [PATCH] gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY
| Newsgroups | org.freedesktop.lists.dri-devel |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] Missing explicit Kconfig dependencies in `.kunitconfig` causes the test to be silently dropped. - [Medium] Adding a tristate dependency to a `bool` config causes Kconfig warnings and hides the configuration prompt when DRM is a module. -- --- Patch [1]: [PATCH] gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY --- commit ffd08cabf5088a2a96497e1ac48e8e50484ee037 Author: Geert Uytterhoeven <[email protected]> gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY This commit changes the Kconfig rules for GPU_BUDDY_KUNIT_TEST to depend on GPU_BUDDY rather than selecting it. It also adds a dependency on DRM or COMPILE_TEST for the GPU_BUDDY allocator itself. > diff --git a/drivers/gpu/Kconfig b/drivers/gpu/Kconfig > --- a/drivers/gpu/Kconfig > +++ b/drivers/gpu/Kconfig > @@ -1,14 +1,15 @@ > # SPDX-License-Identifier: GPL-2.0 > > config GPU_BUDDY > - bool > + bool "Page based buddy allocator for GPU memory" if KUNIT > + depends on DRM || COMPILE_TEST [Severity: Medium] Will adding a tristate dependency (DRM) to a bool config cause Kconfig warnings? If a kernel is configured with CONFIG_DRM=m and CONFIG_COMPILE_TEST=n, a tristate driver that selects GPU_BUDDY will force it to y. Kconfig will compare the selected value (y) against the dependency limit (m from DRM) and issue an unmet direct dependencies detected warning. Additionally, users cannot manually enable the test because Kconfig hides prompts for bool configs when their dependencies evaluate to m. > help > A page based buddy allocator for GPU memory. > > config GPU_BUDDY_KUNIT_TEST > tristate "KUnit tests for GPU buddy allocator" if !KUNIT_ALL_TESTS > depends on KUNIT > - select GPU_BUDDY > + depends on GPU_BUDDY [Severity: Medium] Does this change cause the test to be silently dropped when running kunit.py? Because GPU_BUDDY_KUNIT_TEST now explicitly depends on GPU_BUDDY, which in turn depends on DRM || COMPILE_TEST, if drivers/gpu/tests/.kunitconfig is not updated to include CONFIG_DRM=y (or CONFIG_COMPILE_TEST=y) and CONFIG_GPU_BUDDY=y, Kconfig will evaluate these unmet dependencies as n. This will silently drop CONFIG_GPU_BUDDY_KUNIT_TEST=y from the generated configuration during automated testing. > default KUNIT_ALL_TESTS > help > KUnit tests for the GPU buddy allocator. -- Sashiko AI review · https://sashiko.dev/#/patchset/20260824151230.XuHT5veUT8Oi5un54yAsIsxDMMalaTNf64h7qW1s0ow@z?part=1