All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3] package/rt-tests: add support to build without numactl
@ 2020-12-27 19:13 Andreas Klinger
  2020-12-27 20:04 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Klinger @ 2020-12-27 19:13 UTC (permalink / raw)
  To: buildroot

rt-tests don't show up in config menu and is not build if
BR2_PACKAGE_NUMACTL_ARCH_SUPPORTS is not available on the target
architecture. In such a case numactl is also not available what applies for
most small embedded targets.

This dependency was introduced with commit 7f50cbfb800e
("package/rt-tests: bump to version 1.8")

But rt-tests can also be build without numactl when passing NUMA=0 to make.
This possibility is documented on
https://wiki.linuxfoundation.org/realtime/documentation/howto/tools/rt-tests

Change Config.in and makefile to build without numactl by passing NUMA=0.

Changes in v3:
- make use of numactl dependency only if BR2_PACKAGE_NUMACTL_ARCH_SUPPORTS
  is set.

Changes in v2:
- Thanks to the review of Baruch patch is simplified and directly disabling
  NUMA by querying for !BR2_PACKAGE_NUMACTL_ARCH_SUPPORTS.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
---
 package/rt-tests/Config.in   | 4 +---
 package/rt-tests/rt-tests.mk | 8 +++++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/package/rt-tests/Config.in b/package/rt-tests/Config.in
index cc9b14dccb..4e7fa50a1a 100644
--- a/package/rt-tests/Config.in
+++ b/package/rt-tests/Config.in
@@ -5,8 +5,7 @@ config BR2_PACKAGE_RT_TESTS
 	depends on BR2_USE_MMU # fork()
 	depends on !BR2_STATIC_LIBS # dlopen
 	depends on !BR2_TOOLCHAIN_USES_MUSL # cyclictest
-	depends on BR2_PACKAGE_NUMACTL_ARCH_SUPPORTS
-	select BR2_PACKAGE_NUMACTL
+	select BR2_PACKAGE_NUMACTL if BR2_PACKAGE_NUMACTL_ARCH_SUPPORTS
 	help
 	  Set of utilities for testing the real-time behaviour of a
 	  Linux system.
@@ -34,4 +33,3 @@ comment "rt-tests needs a uClibc or glibc toolchain w/ NPTL, headers >= 3.14, dy
 	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
 		|| BR2_TOOLCHAIN_USES_MUSL || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
 	depends on BR2_USE_MMU
-	depends on BR2_PACKAGE_NUMACTL_ARCH_SUPPORTS
diff --git a/package/rt-tests/rt-tests.mk b/package/rt-tests/rt-tests.mk
index 26c257213b..090c1d9644 100644
--- a/package/rt-tests/rt-tests.mk
+++ b/package/rt-tests/rt-tests.mk
@@ -9,13 +9,19 @@ RT_TESTS_SOURCE = rt-tests-$(RT_TESTS_VERSION).tar.xz
 RT_TESTS_VERSION = 1.9
 RT_TESTS_LICENSE = GPL-2.0+
 RT_TESTS_LICENSE_FILES = COPYING
+
+ifeq ($(BR2_PACKAGE_NUMACTL_ARCH_SUPPORTS),y)
 RT_TESTS_DEPENDENCIES = numactl
+else
+RT_TESTS_MAKE_OPTS += NUMA=0
+endif
 
 define RT_TESTS_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
 		CC="$(TARGET_CC)" \
 		CFLAGS="$(TARGET_CFLAGS)" \
-		prefix=/usr
+		prefix=/usr \
+		$(RT_TESTS_MAKE_OPTS)
 endef
 
 define RT_TESTS_INSTALL_TARGET_CMDS
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH v3] package/rt-tests: add support to build without numactl
  2020-12-27 19:13 [Buildroot] [PATCH v3] package/rt-tests: add support to build without numactl Andreas Klinger
@ 2020-12-27 20:04 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2020-12-27 20:04 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 27 Dec 2020 20:13:50 +0100
Andreas Klinger <ak@it-klinger.de> wrote:

> -	select BR2_PACKAGE_NUMACTL
> +	select BR2_PACKAGE_NUMACTL if BR2_PACKAGE_NUMACTL_ARCH_SUPPORTS

In fact, I disagree with Baruch: if numactl is an optional dependency,
it really should be optional. So this line in Config.in would not be
needed.

> +ifeq ($(BR2_PACKAGE_NUMACTL_ARCH_SUPPORTS),y)

And change this to:

ifeq ($(BR2_PACKAGE_NUMACTL),y)

>  RT_TESTS_DEPENDENCIES = numactl
> +else
> +RT_TESTS_MAKE_OPTS += NUMA=0
> +endif

This way, numactl is only used by rt-tests if numactl is enabled.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-27 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-27 19:13 [Buildroot] [PATCH v3] package/rt-tests: add support to build without numactl Andreas Klinger
2020-12-27 20:04 ` Thomas Petazzoni

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.