All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <huth@tuxfamily.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: buildroot@buildroot.org, Cyril Bur <cyrilbur@gmail.com>
Subject: Re: [Buildroot] [PATCH v4 9/9] package/kvm-unit-tests: allow kvmtool to be used
Date: Sun, 10 Aug 2025 11:16:39 +0200	[thread overview]
Message-ID: <20250810111639.4e36b8e7@tpx1> (raw)
In-Reply-To: <20250805151814.1114414-10-alex.bennee@linaro.org>

Am Tue,  5 Aug 2025 16:18:11 +0100
schrieb Alex Bennée <alex.bennee@linaro.org>:

> For some targets launching tests with kvmtool is an option which makes
> for an even smaller test image. Create a new symbol which can be
> expanded with additional targets that will allow the skipping of the
> selection of QEMU if not needed.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  package/kvm-unit-tests/Config.in         | 9 +++++++--
>  package/kvm-unit-tests/kvm-unit-tests.mk | 7 +++++++
>  2 files changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/package/kvm-unit-tests/Config.in b/package/kvm-unit-tests/Config.in
> index b89f013f2a..80ebc500c6 100644
> --- a/package/kvm-unit-tests/Config.in
> +++ b/package/kvm-unit-tests/Config.in
> @@ -13,6 +13,11 @@ config BR2_PACKAGE_KVM_UNIT_TESTS_ARCH_SUPPORTS
>  	default y if BR2_powerpc64 || BR2_powerpc64le
>  	default y if BR2_s390x
>  
> +# Some architectures can use kvmtool instead of QEMU to launch the tests
> +config BR2_PACKAGE_KVM_UNIT_TESTS_CAN_USE_KVMTOOL
> +	bool
> +	default y if BR2_aarch64 && BR2_PACKAGE_KVMTOOL
> +
>  config BR2_PACKAGE_KVM_UNIT_TESTS
>  	bool "kvm-unit-tests"
>  	depends on BR2_HOSTARCH = "x86_64" || !BR2_x86_64
> @@ -22,8 +27,8 @@ config BR2_PACKAGE_KVM_UNIT_TESTS
>  	depends on (BR2_PACKAGE_GLIBC_UTILS || \
>  		    BR2_UCLIBC_INSTALL_UTILS || \
>  		    BR2_TOOLCHAIN_EXTERNAL_LIBC_UTILS_COPY) # runtime getconf
> -	select BR2_PACKAGE_QEMU
> -	select BR2_PACKAGE_QEMU_SYSTEM # runtime for qemu-system-$ARCH
> +	select BR2_PACKAGE_QEMU if !BR2_PACKAGE_KVM_UNIT_TESTS_CAN_USE_KVMTOOL
> +	select BR2_PACKAGE_QEMU_SYSTEM if !BR2_PACKAGE_KVM_UNIT_TESTS_CAN_USE_KVMTOOL # runtime for qemu-system-$ARCH
>  	select BR2_PACKAGE_COREUTILS # runtime for timeout
>  	select BR2_PACKAGE_BASH # runtime
>  	select BR2_PACKAGE_NMAP
> diff --git a/package/kvm-unit-tests/kvm-unit-tests.mk b/package/kvm-unit-tests/kvm-unit-tests.mk
> index efc3c859aa..cf995ff54e 100644
> --- a/package/kvm-unit-tests/kvm-unit-tests.mk
> +++ b/package/kvm-unit-tests/kvm-unit-tests.mk
> @@ -40,6 +40,13 @@ KVM_UNIT_TESTS_CONF_OPTS =\
>  	--processor="$(GCC_TARGET_CPU)" \
>  	--endian="$(KVM_UNIT_TESTS_ENDIAN)"
>  
> +# The default runner is QEMU but kvmtool can also be used
> +ifeq ($(BR2_PACKAGE_QEMU_SYSTEM),y)
> +KVM_UNIT_TESTS_CONF_OPTS += --target=qemu
> +else ifeq ($(BR2_PACKAGE_KVMTOOL),y)
> +KVM_UNIT_TESTS_CONF_OPTS += --target=kvmtool
> +endif
> +
>  ifeq ($(BR2_ARM64_PAGE_SIZE_4K),y)
>  KVM_UNIT_TESTS_CONF_OPTS += --page-size=4k
>  else ifeq ($(BR2_ARM64_PAGE_SIZE_16K),y)

Reviewed-by: Thomas Huth <huth@tuxfamily.org>

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-08-10  9:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05 15:18 [Buildroot] [PATCH v4 0/9] kvm-unit-tests: update deps and fine tune qemu Alex Bennée
2025-08-05 15:18 ` [Buildroot] [PATCH v4 1/9] toolchain/external: allow installing of libc utils Alex Bennée
2025-08-05 15:18 ` [Buildroot] [PATCH v4 2/9] package/kvm-unit-tests: assume AArch64 supports KVM Alex Bennée
2025-08-11 15:40   ` Jesse Taube
2025-08-11 15:56     ` Jesse Taube
2025-08-05 15:18 ` [Buildroot] [PATCH v4 3/9] package/kvm-unit-tests: update dependencies Alex Bennée
2025-08-10  9:15   ` Thomas Huth
2025-08-11 15:54     ` Jesse Taube
2025-08-11 16:16       ` Jesse Taube
2025-08-05 15:18 ` [Buildroot] [PATCH v4 4/9] package/qemu: introduce kvm and tcg system options Alex Bennée
2025-08-05 15:18 ` [Buildroot] [PATCH v4 5/9] package/kvm-unit-tests: bump to v2025-07-31 Alex Bennée
2025-08-05 23:37   ` Thomas Huth
2025-08-11 15:58     ` Jesse Taube
2025-08-05 15:18 ` [Buildroot] [PATCH v4 6/9] package/kvm-unit-tests: honour BR2_ARM64_PAGE_SIZE Alex Bennée
2025-08-05 15:18 ` [Buildroot] [PATCH v4 7/9] support/testing: add test for kvm-unit-tests Alex Bennée
2025-08-05 15:18 ` [Buildroot] [PATCH v4 8/9] package/kvmtool: bump to current HEAD Alex Bennée
2025-08-11 16:20   ` Jesse Taube
2025-08-05 15:18 ` [Buildroot] [PATCH v4 9/9] package/kvm-unit-tests: allow kvmtool to be used Alex Bennée
2025-08-10  9:16   ` Thomas Huth [this message]
2025-08-11 16:05     ` Jesse Taube

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250810111639.4e36b8e7@tpx1 \
    --to=huth@tuxfamily.org \
    --cc=alex.bennee@linaro.org \
    --cc=buildroot@buildroot.org \
    --cc=cyrilbur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.