Re: [PATCH] gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY

[email protected]
Newsgroups org.freedesktop.lists.dri-devel
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing `.kunitconfig` update causes `kunit.py` to fail due to unmet dependencies.
--

--- Patch [1]: [PATCH] gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY ---
commit cb5627cb79f60b67a5672a81939fd993a20abdd4
Author: Geert Uytterhoeven <[email protected]>

gpu: GPU_BUDDY_KUNIT_TEST should not select GPU_BUDDY

This commit changes the GPU_BUDDY_KUNIT_TEST Kconfig entry to depend on
GPU_BUDDY rather than selecting it. It also adds a dependency on DRM or
COMPILE_TEST to the GPU_BUDDY option.

> diff --git a/drivers/gpu/Kconfig b/drivers/gpu/Kconfig
> index 3bcf08260d73a..d881ab6f7a006 100644
> --- 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
>         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]
Since this changes from a select to a dependency, does the KUnit configuration
file at drivers/gpu/tests/.kunitconfig also need to be updated?

If CONFIG_COMPILE_TEST=y and CONFIG_GPU_BUDDY=y are not added to 
.kunitconfig, running kunit.py will fail because CONFIG_GPU_BUDDY_KUNIT_TEST 
will be silently dropped from the generated config due to unmet dependencies.

>         default KUNIT_ALL_TESTS
>         help
>           KUnit tests for the GPU buddy allocator.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/1e519fb24aa5521788d69cc7980665ccbc227b14.1787584184.git.geert@linux-m68k.org?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.