[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABVgOSmVPStp91aSLpSMs1618r7j2JCA8Xbt4BnBz7-97fO+-A@mail.gmail.com>
Date: Fri, 20 Jun 2025 17:47:58 +0800
From: David Gow <davidgow@...gle.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: Masahiro Yamada <masahiroy@...nel.org>, Nathan Chancellor <nathan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, Willy Tarreau <w@....eu>,
Thomas Weißschuh <linux@...ssschuh.net>,
Brendan Higgins <brendan.higgins@...ux.dev>, Rae Moar <rmoar@...gle.com>,
Shuah Khan <shuah@...nel.org>, Jonathan Corbet <corbet@....net>,
Nicolas Schier <nicolas.schier@...ux.dev>, Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Alexandre Ghiti <alex@...ti.fr>, Christophe Leroy <christophe.leroy@...roup.eu>,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
linux-doc@...r.kernel.org, linux-riscv@...ts.infradead.org,
workflows@...r.kernel.org
Subject: Re: [PATCH v3 11/16] kunit: Always descend into kunit directory
during build
On Wed, 11 Jun 2025 at 15:38, Thomas Weißschuh
<thomas.weissschuh@...utronix.de> wrote:
>
> An upcoming change will add 'userprogs' to the kunit subdirectory.
> For kbuild to properly clean up these build artifacts the subdirectory
> needs to be always processed.
>
> Pushing the special logic for hook.o into the kunit Makefile also makes the
> logic easier to understand.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> ---
I'm quite happy with this.
Reviewed-by: David Gow <davidgow@...gle.com>
Cheers,
-- David
> lib/Makefile | 4 ----
> lib/kunit/Makefile | 2 +-
> 2 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/lib/Makefile b/lib/Makefile
> index c38582f187dd81916113319072e5cfef26f26c84..698566135091cc3bf0054f1954b434dc3325364a 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -108,11 +108,7 @@ test_fpu-y := test_fpu_glue.o test_fpu_impl.o
> CFLAGS_test_fpu_impl.o += $(CC_FLAGS_FPU)
> CFLAGS_REMOVE_test_fpu_impl.o += $(CC_FLAGS_NO_FPU)
>
> -# Some KUnit files (hooks.o) need to be built-in even when KUnit is a module,
> -# so we can't just use obj-$(CONFIG_KUNIT).
> -ifdef CONFIG_KUNIT
> obj-y += kunit/
> -endif
>
> ifeq ($(CONFIG_DEBUG_KOBJECT),y)
> CFLAGS_kobject.o += -DDEBUG
> diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
> index 5aa51978e456ab3bb60c12071a26cf2bdcb1b508..656f1fa35abcc635e67d5b4cb1bc586b48415ac5 100644
> --- a/lib/kunit/Makefile
> +++ b/lib/kunit/Makefile
> @@ -17,7 +17,7 @@ kunit-objs += debugfs.o
> endif
>
> # KUnit 'hooks' are built-in even when KUnit is built as a module.
> -obj-y += hooks.o
> +obj-$(if $(CONFIG_KUNIT),y) += hooks.o
>
> obj-$(CONFIG_KUNIT_TEST) += kunit-test.o
> obj-$(CONFIG_KUNIT_TEST) += platform-test.o
>
> --
> 2.49.0
>
> --
> You received this message because you are subscribed to the Google Groups "KUnit Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kunit-dev+unsubscribe@...glegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/kunit-dev/20250611-kunit-kselftests-v3-11-55e3d148cbc6%40linutronix.de.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5281 bytes)
Powered by blists - more mailing lists