diff mbox series

[1/1] package/ltp-testsuite: kirk needs python3

Message ID 20260114192413.569151-1-tarelovma@yandex.ru
State Handled Elsewhere
Headers show
Series [1/1] package/ltp-testsuite: kirk needs python3 | expand

Commit Message

Maxim Tarelov Jan. 14, 2026, 7:24 p.m. UTC
LTP project contains a number of scripts, such as kirk, which depend on
python3, but not all boards _defconfigs enable python3 by default.

To avoid errors like this:
 # /usr/lib/ltp-testsuite/kirk
 env: can't execute 'python3': No such file or directory

we must explicitly enable python3 when selecting LTP.

Signed-off-by: Maxim Tarelov <tarelovma@yandex.ru>
---
 package/ltp-testsuite/Config.in        | 1 +
 package/ltp-testsuite/ltp-testsuite.mk | 2 ++
 2 files changed, 3 insertions(+)

Comments

Petr Vorel Jan. 16, 2026, 6:35 a.m. UTC | #1
Hi,

[ Cc Julien and Thomas ]

> LTP project contains a number of scripts, such as kirk, which depend on
> python3, but not all boards _defconfigs enable python3 by default.

> To avoid errors like this:
>  # /usr/lib/ltp-testsuite/kirk
>  env: can't execute 'python3': No such file or directory

> we must explicitly enable python3 when selecting LTP.

> Signed-off-by: Maxim Tarelov <tarelovma@yandex.ru>
> ---
>  package/ltp-testsuite/Config.in        | 1 +
>  package/ltp-testsuite/ltp-testsuite.mk | 2 ++
>  2 files changed, 3 insertions(+)

> diff --git a/package/ltp-testsuite/Config.in b/package/ltp-testsuite/Config.in
> index 81dc9dffee..0ddc2fe02c 100644
> --- a/package/ltp-testsuite/Config.in
> +++ b/package/ltp-testsuite/Config.in
> @@ -15,6 +15,7 @@ config BR2_PACKAGE_LTP_TESTSUITE
>  	depends on BR2_PACKAGE_LTP_TESTSUITE_ARCH_SUPPORTS
>  	select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
>  	select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC
> +	select BR2_PACKAGE_PYTHON3

I would prefer not to drag python3 for all people which want LTP.
There are a different ways to use LTP.

1) Preferred way to use kirk is to run it remotely. The main advantage is to to
detect test crashed the kernel, actually one of the reasons why we wrote kirk.
Also to reduce dependencies on SUT.

2) Run a single test (user wants to test sinle kernel/libc fix). Any LTP test
can be run just by executing it. Any runner (kirk or the old script runltp) is
to help using runtest files (and help with other tasks).

Moreover Buildroot has support/testing/tests/package/test_ltp_testsuite.py
where Julien adds kirk + BR2_PACKAGE_PYTHON3=y [1].

If this must be added differently, maybe a new option: "run kirk locally"
which would drag python3.

Also, I'm not sure if people are aware of support scripts (I did not know),
but I don't think anything can be done for it.

Kind regards,
Petr

[1] https://lore.kernel.org/buildroot/20251221180810.3770181-1-ju.o@free.fr/

>  	help
>  	  The Linux Test Project provides a huge testsuite for Linux.

> diff --git a/package/ltp-testsuite/ltp-testsuite.mk b/package/ltp-testsuite/ltp-testsuite.mk
> index e4e3ff8717..c103ac9819 100644
> --- a/package/ltp-testsuite/ltp-testsuite.mk
> +++ b/package/ltp-testsuite/ltp-testsuite.mk
> @@ -13,6 +13,8 @@ LTP_TESTSUITE_LICENSE_FILES = COPYING

>  LTP_TESTSUITE_CONF_OPTS += --disable-metadata

> +LTP_TESTSUITE_DEPENDENCIES += python3
> +
>  ifeq ($(BR2_PACKAGE_LTP_TESTSUITE_OPEN_POSIX),y)
>  LTP_TESTSUITE_CONF_OPTS += --with-open-posix-testsuite
>  endif
diff mbox series

Patch

diff --git a/package/ltp-testsuite/Config.in b/package/ltp-testsuite/Config.in
index 81dc9dffee..0ddc2fe02c 100644
--- a/package/ltp-testsuite/Config.in
+++ b/package/ltp-testsuite/Config.in
@@ -15,6 +15,7 @@  config BR2_PACKAGE_LTP_TESTSUITE
 	depends on BR2_PACKAGE_LTP_TESTSUITE_ARCH_SUPPORTS
 	select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC
+	select BR2_PACKAGE_PYTHON3
 	help
 	  The Linux Test Project provides a huge testsuite for Linux.
 
diff --git a/package/ltp-testsuite/ltp-testsuite.mk b/package/ltp-testsuite/ltp-testsuite.mk
index e4e3ff8717..c103ac9819 100644
--- a/package/ltp-testsuite/ltp-testsuite.mk
+++ b/package/ltp-testsuite/ltp-testsuite.mk
@@ -13,6 +13,8 @@  LTP_TESTSUITE_LICENSE_FILES = COPYING
 
 LTP_TESTSUITE_CONF_OPTS += --disable-metadata
 
+LTP_TESTSUITE_DEPENDENCIES += python3
+
 ifeq ($(BR2_PACKAGE_LTP_TESTSUITE_OPEN_POSIX),y)
 LTP_TESTSUITE_CONF_OPTS += --with-open-posix-testsuite
 endif