[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250526-woodoo-hoatzin-from-tartarus-538641@l-nschier-aarch64>
Date: Mon, 26 May 2025 16:22:29 +0200
From: Nicolas Schier <nicolas.schier@...ux.dev>
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>,
David Gow <davidgow@...gle.com>, Rae Moar <rmoar@...gle.com>,
Shuah Khan <shuah@...nel.org>, Jonathan Corbet <corbet@....net>,
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
Subject: Re: [PATCH v2 10/11] kunit: uapi: Introduce preinit executable
On Mon, Apr 07, 2025 at 09:42:47AM +0200, Thomas Weißschuh wrote:
> UAPI selftests may expect a "normal" userspace environment.
> For example the normal kernel API pseudo-filesystems should be mounted.
> This could be done from kernel code but it is non-idiomatic.
>
> Add a preinit userspace executable which performs these setup steps
> before running the final test executable.
> This preinit executable is only ever run from the kernel.
> Give it access to autoconf.h and kconfig.h to adapt itself to the
> tested kernel.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> ---
> lib/kunit/Makefile | 9 ++++++-
> lib/kunit/uapi-preinit.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
> lib/kunit/uapi.c | 11 ++++++--
> 3 files changed, 82 insertions(+), 3 deletions(-)
>
> diff --git a/lib/kunit/Makefile b/lib/kunit/Makefile
> index 1b6be12676f89cafa34f0093d8136b36f4cf5532..0e9a26d90bf4d5128e270ecaa8f3465f28da0fa2 100644
> --- a/lib/kunit/Makefile
> +++ b/lib/kunit/Makefile
> @@ -12,7 +12,14 @@ kunit-objs += test.o \
> device.o \
> platform.o
>
> -kunit-$(CONFIG_KUNIT_UAPI) += uapi.o
> +userprogs += uapi-preinit
as for kunit-example-uapi, please add a 'clean-files' definition:
clean-files += uapi-preinit
--
Nicolas Schier
Powered by blists - more mailing lists