Skip to contentSkip to conversation

package/rt-tests: switch to the upstream repository

PATCH New Romain Naour 2 participants 7 messages Jul 14, 2016 – Jul 16, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/rt-tests: switch to the upstream repository

rt-tests is not maintained from Clark Williams's repository anymore.

---
We missed some rt-tests release (v0.90 to v1.0). Since v0.92 a release tarball is available at
https://www.kernel.org/pub/linux/utils/rt-tests so we no longer need to clone the git repository.

---
 package/rt-tests/rt-tests.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/rt-tests/rt-tests.mk +1 -1
index 74d7c6d..380bacf 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-RT_TESTS_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
+RT_TESTS_SITE = git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
 RT_TESTS_VERSION = v0.89
 RT_TESTS_LICENSE = GPLv2+
 RT_TESTS_LICENSE_FILES = COPYING
Signature · 1 line
2.5.5
#1 lore raw

PATCH 2/3 package/rt-tests: bump to 1.0

Rebase patch 01 and 02 on v1.0
Remove upstream patches 03 and 04.

Switch to release tarball (.xz) and use BR2_KERNEL_MIRROR

Remove HASPYTHON since it has been removed from patch 01 and clear PYLIB if PYTHON package is not selected.

Remove NPTL handling since the patch upstreamed by Alexey Brodkin has been reverted [1]

Add hash file

[1] https://git.kernel.org/cgit/utils/rt-tests/rt-tests.git/commit/?id=6f3c1ba9e8403cff6ca12351c43bde68e0fbca25

Cc Alexey Brodkin <[email protected]>
---
 ...s-minor-issues-with-rt-tests-build-system.patch |  55 +++++++++++
 .../0002-Fix-a-build-issue-with-uClibc-ng.patch    |  33 +++++++
 package/rt-tests/01-fix-build-system.patch         |  52 ----------
 package/rt-tests/02-uclibc.patch                   | 109 ---------------------
 package/rt-tests/03-fix-non-nptl-buil.patch        |  55 -----------
 .../04-Makefile-fix-tests-dependencies.patch       |  50 ----------
 package/rt-tests/Config.in                         |   6 +-
 package/rt-tests/rt-tests.hash                     |   2 +
 package/rt-tests/rt-tests.mk                       |  15 +--
 9 files changed, 97 insertions(+), 280 deletions(-)
 create mode 100644 package/rt-tests/0001-Fix-various-minor-issues-with-rt-tests-build-system.patch
 create mode 100644 package/rt-tests/0002-Fix-a-build-issue-with-uClibc-ng.patch
 delete mode 100644 package/rt-tests/01-fix-build-system.patch
 delete mode 100644 package/rt-tests/02-uclibc.patch
 delete mode 100644 package/rt-tests/03-fix-non-nptl-buil.patch
 delete mode 100644 package/rt-tests/04-Makefile-fix-tests-dependencies.patch
 create mode 100644 package/rt-tests/rt-tests.hash
package/rt-tests/0001-Fix-various-minor-issues-with-rt-tests-build-system.patch new file +55 -0
new file mode 100644
index 0000000..5d1e726
@@ -0,0 +1,55 @@
+From eb47c07e9d20e0b1a6cc4b0df26f24f22f024f1c Mon Sep 17 00:00:00 2001
+From: Alexey Brodkin <[email protected]>
+Date: Mon, 10 Nov 2014 11:44:55 +0300
+Subject: [PATCH 1/2] Fix various minor issues with rt-tests build system
+
+The issues fixed are :
+
+ * Remove the automatic NUMA detection from the host
+   architecture. This is broken when doing cross-compilation. One can
+   still set NUMA=1 if NUMA support is desired.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+Signed-off-by: Alexey Brodkin <[email protected]>
+Cc: Peter Korsgaard <[email protected]>
+[Romain:
+    rebase on v1.0
+    Remove HASPYTHON since PYLIB can be overriden from the environment]
+Signed-off-by: Romain Naour <[email protected]>
+---
+ Makefile | 19 -------------------
+ 1 file changed, 19 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a54d82b..0946f93 100644
+--- a/Makefile
++++ b/Makefile
+@@ -38,25 +38,6 @@ else
+ 	CFLAGS	+= -O0 -g
+ endif
+ 
+-# We make some gueses on how to compile rt-tests based on the machine type
+-# and the ostype. These can often be overridden.
+-dumpmachine := $(shell $(CC) -dumpmachine)
+-
+-# The ostype is typically something like linux or android
+-ostype := $(lastword $(subst -, ,$(dumpmachine)))
+-
+-machinetype := $(shell echo $(dumpmachine)| \
+-    sed -e 's/-.*//' -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/')
+-
+-# The default is to assume you have libnuma installed, which is fine to do
+-# even on non-numa machines. If you don't want to install the numa libs, for
+-# example, they might not be available in an embedded environment, then
+-# compile with
+-# make NUMA=0
+-ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
+-NUMA 	:= 1
+-endif
+-
+ # The default is to assume that you have numa_parse_cpustring_all
+ # If you have an older version of libnuma that only has numa_parse_cpustring
+ # then compile with
+-- 
+2.5.5
+
package/rt-tests/0002-Fix-a-build-issue-with-uClibc-ng.patch new file +33 -0
new file mode 100644
index 0000000..be48507
@@ -0,0 +1,33 @@
+From 21e0c16a85c2e028a963703511d750d1751bc254 Mon Sep 17 00:00:00 2001
+From: Alexey Brodkin <[email protected]>
+Date: Wed, 13 Jul 2016 23:46:38 +0200
+Subject: [PATCH 2/2] Fix a build issue with uClibc-ng
+
+uClibc-ng has clock_nanosleep() if built with UCLIBC_HAS_ADVANCED_REALTIME,
+  conflicting with emulation function.
+
+Signed-off-by: Peter Korsgaard <[email protected]>
+[Romain:
+    rebase on v1.0
+    remove uClibc legacy support, uClibc-ng provide utmpx.h]
+Signed-off-by: Romain Naour <[email protected]>
+---
+ src/cyclictest/cyclictest.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
+index 00e5f3d..92fa3dd 100644
+--- a/src/cyclictest/cyclictest.c
++++ b/src/cyclictest/cyclictest.c
+@@ -58,7 +58,7 @@
+ #define gettid() syscall(__NR_gettid)
+ #define sigev_notify_thread_id _sigev_un._tid
+ 
+-#ifdef __UCLIBC__
++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_ADVANCED_REALTIME__)
+ #define MAKE_PROCESS_CPUCLOCK(pid, clock) \
+ 	((~(clockid_t) (pid) << 3) | (clockid_t) (clock))
+ #define CPUCLOCK_SCHED          2
+-- 
+2.5.5
+
package/rt-tests/01-fix-build-system.patch deleted +0 -52

52 lines not on this page · raw message

package/rt-tests/02-uclibc.patch deleted +0 -109

109 lines not on this page · raw message

package/rt-tests/03-fix-non-nptl-buil.patch deleted +0 -55

55 lines not on this page · raw message

package/rt-tests/04-Makefile-fix-tests-dependencies.patch deleted +0 -50

50 lines not on this page · raw message

package/rt-tests/Config.in +3 -3
index 96e0bad..12e084e 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_RT_TESTS
 	bool "rt-tests"
-	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_USE_MMU # fork()
 	depends on !BR2_STATIC_LIBS # dlopen
 	help
@@ -27,6 +27,6 @@ comment "rt-tests may not work on MIPS with an external uClibc toolchain"
 	depends on BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
 
-comment "rt-tests needs a toolchain w/ threads, dynamic library"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+comment "rt-tests needs a toolchain w/ NPTL, dynamic library"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
 	depends on BR2_USE_MMU
package/rt-tests/rt-tests.hash new file +2 -0
new file mode 100644
index 0000000..f37af43
@@ -0,0 +1,2 @@
+# locally computed hash
+sha256 aea85fd8eda8c1d96e9d32a019bfd4a1d2e0d362971d97838996f49d1af2d470  rt-tests-1.0.tar.xz
package/rt-tests/rt-tests.mk +4 -11
index 380bacf..19f1021 100644
@@ -4,8 +4,9 @@
 #
 ################################################################################
 
-RT_TESTS_SITE = git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
-RT_TESTS_VERSION = v0.89
+RT_TESTS_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/rt-tests
+RT_TESTS_SOURCE = rt-tests-$(RT_TESTS_VERSION).tar.xz
+RT_TESTS_VERSION = 1.0
 RT_TESTS_LICENSE = GPLv2+
 RT_TESTS_LICENSE_FILES = COPYING
 
@@ -13,26 +14,18 @@ ifeq ($(BR2_PACKAGE_PYTHON),y)
 RT_TESTS_DEPENDENCIES = python
 endif
 
-ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
-RT_TESTS_HAVE_NPTL=yes
-else
-RT_TESTS_HAVE_NPTL=no
-endif
-
 define RT_TESTS_BUILD_CMDS
 	$(MAKE) -C $(@D) 			\
 		CC="$(TARGET_CC)" 		\
-		HAVE_NPTL=$(RT_TESTS_HAVE_NPTL)	\
 		CFLAGS="$(TARGET_CFLAGS)"	\
 		prefix=/usr
 endef
 
 define RT_TESTS_INSTALL_TARGET_CMDS
 	$(MAKE) -C $(@D) 				\
-		HAVE_NPTL=$(RT_TESTS_HAVE_NPTL)		\
 		DESTDIR="$(TARGET_DIR)" 		\
 		prefix=/usr 				\
-		$(if $(BR2_PACKAGE_PYTHON),HASPYTHON=1 PYLIB=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/) \
+		$(if $(BR2_PACKAGE_PYTHON),PYLIB=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/,PYLIB="") \
 		install
 endef
 
Signature · 1 line
2.5.5
#2 lore raw

PATCH 2/3 package/rt-tests: bump to 1.0

Hello,

One quick comment on this patch.

Review

Quoted 3 lines · Romain Naour
(quoted diff) +2 -0
+Subject: [PATCH 1/2] Fix various minor issues with rt-tests build system
 
+Subject: [PATCH 2/2] Fix a build issue with uClibc-ng

Please use "git format-patch -N" when generating patches for Buildroot packages, in order to avoid the 1/2 and 2/2 specifications. These specifications very quickly get wrong when we add or remove patches, so we prefer not to have them.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 2/3 package/rt-tests: bump to 1.0

Hi Thomas,

Le 15/07/2016 ? 15:04, Thomas Petazzoni a ?crit :

Quoted 6 lines

Hello,

One quick comment on this patch.

On Thu, 14 Jul 2016 21:01:08 +0200, Romain Naour wrote:

Quoted 8 lines

Review

Quoted 3 lines
(quoted diff) +2 -0
+Subject: [PATCH 1/2] Fix various minor issues with rt-tests build system
 
+Subject: [PATCH 2/2] Fix a build issue with uClibc-ng

Please use "git format-patch -N" when generating patches for Buildroot packages, in order to avoid the 1/2 and 2/2 specifications. These specifications very quickly get wrong when we add or remove patches, so we prefer not to have them.

Agree, I just forgot about patch numbering.

I noticed a build issue with this new version of rt-tests [1] due to local syscall number definition for the new kernel deadline scheduler on some architectures. Upsteam added __NR_sched_setattr and __NR_sched_setattr definition for common architectures (x86, x86_64, arm) and tile if not already defined [2].

Maybe instead of adding missing syscall number, we can avoid building rt-tests with toolchain compiled with too old kernel headers (i.e BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14)

Thoughts ?

Best regards,
Romain

[1]
http://autobuild.buildroot.net/results/6fa/6facaeb10588bdf3ff029b882a8ae6ffba815cdc
[2]
https://kernel.googlesource.com/pub/scm/utils/rt-tests/rt-tests.git/+/ef2dee4232b7cae594ef7ecb7230c4bd18cea3f3%5E%21/

Quoted 5 lines

Thanks,

Thomas

#4 lore raw

PATCH 2/3 package/rt-tests: bump to 1.0

Hello,

Quoted 11 lines · Romain Naour

I noticed a build issue with this new version of rt-tests [1] due to local syscall number definition for the new kernel deadline scheduler on some architectures. Upsteam added __NR_sched_setattr and __NR_sched_setattr definition for common architectures (x86, x86_64, arm) and tile if not already defined [2].

Maybe instead of adding missing syscall number, we can avoid building rt-tests with toolchain compiled with too old kernel headers (i.e BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14)

Thoughts ?

We can do that and then see if some people using older kernels complain that rt-tests are not available for them.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 3/3 package/rt-tests: disable for musl toolchains

In reply to Romain Naour

The cyclictest program doesn't build with musl toolchains due to several issues with a different implementation of the "struct sigevent" from Glibc/uClibc and musl (similar to [1]).

The pi_stress program doesn't build with musl toolchains with the following error since musl doesn't provide _POSIX_THREAD_PRIO_INHERIT define even if musl have Priority Inheritance mutexes [2]:

src/pi_tests/pi_stress.c:78:2: error: #error "Can't run this test without PI Mutex support"
#error "Can't run this test without PI Mutex support"

Since the fix for cyclictest is not trivial, disable rt-tests for musl toolchains.

Fixes:
http://autobuild.buildroot.net/results/c27/c272ef7df6190cbb688e6db0b1ee210e6fbb472c

[1] https://bugs.mysql.com/bug.php?id=80322
[2] http://www.openwall.com/lists/musl/2016/03/18/6

---
 package/rt-tests/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/rt-tests/Config.in +4 -2
index 12e084e..08967ce 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_RT_TESTS
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_USE_MMU # fork()
 	depends on !BR2_STATIC_LIBS # dlopen
+	depends on !BR2_TOOLCHAIN_USES_MUSL # cyclictest
 	help
 	  Set of utilities for testing the real-time behaviour of a
 	  Linux system.
@@ -27,6 +28,7 @@ comment "rt-tests may not work on MIPS with an external uClibc toolchain"
 	depends on BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
 
-comment "rt-tests needs a toolchain w/ NPTL, dynamic library"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
+comment "rt-tests needs a uClibc or glibc toolchain w/ NPTL, dynamic library"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
+		|| BR2_TOOLCHAIN_USES_MUSL
 	depends on BR2_USE_MMU
Signature · 1 line
2.5.5
#6 lore raw

PATCH 1/3 package/rt-tests: switch to the upstream repository

In reply to Romain Naour

Hello,

Quoted 11 lines · Romain Naour

rt-tests is not maintained from Clark Williams's repository anymore.

---
We missed some rt-tests release (v0.90 to v1.0). Since v0.92 a release tarball is available at
https://www.kernel.org/pub/linux/utils/rt-tests so we no longer need to clone the git repository.

---
 package/rt-tests/rt-tests.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Series applied, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com