rt-tests: patches rename & versoin bump & support of non-NPTL tools
cover rt-tests: patches rename & versoin bump & support of non-NPTL tools
This series introduces significant changes to "rt-tests" package.
1. Now patches are named in accordance to new naming scheme (without leading package name)
2. Origin of sources is switched to Debian snapshots FTP to real origin in kernel's git repo. So no need to track Debian folders etc, just bump version number when required.
3. As mentioned above version with a simple move version is bumped to the most recent one.
4. Probably the most interesting feature - now even if there's no NTPL-enabled toolchain for a given platform user still may build some nice and helpful tests. For example "hackbench" etc.
Alexey Brodkin (4):
rt-tests: rename patch to the new convention
rt-tests: switch site from Debian snapshot to Linux's git
rt-tests: bump version to 0.89
rt-tests: allow building subset of tests with non-NPTL toolchains
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 ++++++++++++ package/rt-tests/Config.in | 4 - package/rt-tests/rt-tests-fix-build-system.patch | 43 --------- package/rt-tests/rt-tests-uclibc.patch | 103 --------------------- package/rt-tests/rt-tests.mk | 11 ++- 7 files changed, 224 insertions(+), 153 deletions(-) create mode 100644 package/rt-tests/01-fix-build-system.patch create mode 100644 package/rt-tests/02-uclibc.patch create mode 100644 package/rt-tests/03-fix-non-nptl-buil.patch delete mode 100644 package/rt-tests/rt-tests-fix-build-system.patch delete mode 100644 package/rt-tests/rt-tests-uclibc.patch
Signature · 1 line
1.9.3
PATCH 1/4 rt-tests: rename patch to the new convention
As a preparation to the introduction of an additional patch to rt-tests, let's rename the existing patch to the new naming convention.
--- package/rt-tests/01-fix-build-system.patch | 43 ++++++++++ package/rt-tests/02-uclibc.patch | 103 +++++++++++++++++++++++ package/rt-tests/rt-tests-fix-build-system.patch | 43 ---------- package/rt-tests/rt-tests-uclibc.patch | 103 ----------------------- 4 files changed, 146 insertions(+), 146 deletions(-) create mode 100644 package/rt-tests/01-fix-build-system.patch create mode 100644 package/rt-tests/02-uclibc.patch delete mode 100644 package/rt-tests/rt-tests-fix-build-system.patch delete mode 100644 package/rt-tests/rt-tests-uclibc.patch
package/rt-tests/01-fix-build-system.patch new file +43 -0
@@ -0,0 +1,43 @@ +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. + + * Expand the CFLAGS provided through the environment instead of + overriding it. + + * Provide a HASPYTHON variable to tell whether the target system has + Python or not. Otherwise, the build system simply tests whether + Python is available on the host. The PYLIB variable is also changed + so that it can be overriden from the environment, in order to + provide the correct Python module location for the target. + +Signed-off-by: Thomas Petazzoni <[email protected]> + +Index: rt-tests/Makefile +=================================================================== +--- rt-tests.orig/Makefile ++++ rt-tests/Makefile +@@ -14,15 +14,11 @@ + mandir ?= $(prefix)/share/man + srcdir ?= $(prefix)/src + +-machinetype = $(shell uname -m | \ +- sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/') +-ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),) +-NUMA := 1 +-endif +- +-CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include ++override CFLAGS += -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include + +-PYLIB := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') ++ifeq ($(HASPYTHON),1) ++PYLIB ?= $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') ++endif + + ifndef DEBUG + CFLAGS += -O2
package/rt-tests/02-uclibc.patch new file +103 -0
103 lines not on this page · raw message
package/rt-tests/rt-tests-fix-build-system.patch deleted +0 -43
43 lines not on this page · raw message
package/rt-tests/rt-tests-uclibc.patch deleted +0 -103
103 lines not on this page · raw message
Signature · 1 line
1.9.3
PATCH 2/4 rt-tests: switch site from Debian snapshot to Linux's git
In reply to Alexey BrodkinOrigin of "rt-tests" is:git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
Switching to this new "origin" simplifies version bumping because there's no need in updating Debian snapshot folder as it was done already here:
http://git.buildroot.net/buildroot/commit/package/rt-tests?id=da330e508c2d95e898ac52a2aa39426a5f6d0506
--- package/rt-tests/rt-tests.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
package/rt-tests/rt-tests.mk +2 -3
@@ -4,9 +4,8 @@ # ################################################################################ -RT_TESTS_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/r/rt-tests -RT_TESTS_VERSION = 0.83 -RT_TESTS_SOURCE = rt-tests_$(RT_TESTS_VERSION).orig.tar.gz +RT_TESTS_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git +RT_TESTS_VERSION = v0.83 RT_TESTS_LICENSE = GPLv2+ RT_TESTS_LICENSE_FILES = COPYING
Signature · 1 line
1.9.3
PATCH 3/4 rt-tests: bump version to 0.89
In reply to Alexey BrodkinWith this change we're moving to the latest version of rt-tests.
Existing patches were updated so they apply on sources without errors and warnings.
In "01-fix-build-system.patch" CFLAGS substitution was removed because now external CFLAGS are accepted:
http://git.kernel.org/cgit/linux/kernel/git/clrkwllms/rt-tests.git/commit/?id=dfcef6e557b7980a33aa30b45bde196ed1780eb1
--- package/rt-tests/01-fix-build-system.patch | 35 +++++++++----- package/rt-tests/02-uclibc.patch | 76 ++++++++++++++++-------------- package/rt-tests/rt-tests.mk | 2 +- 3 files changed, 64 insertions(+), 49 deletions(-)
package/rt-tests/01-fix-build-system.patch +22 -13
@@ -1,4 +1,7 @@ -Fix various minor issues with rt-tests build system +From f9a55a87af57780ea8940561d22cd6a90f461416 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin <[email protected]> +Date: Mon, 10 Nov 2014 11:44:55 +0300 +Subject: [PATCH] Fix various minor issues with rt-tests build system The issues fixed are :
@@ -6,9 +9,6 @@ The issues fixed are : architecture. This is broken when doing cross-compilation. One can still set NUMA=1 if NUMA support is desired. - * Expand the CFLAGS provided through the environment instead of - overriding it. - * Provide a HASPYTHON variable to tell whether the target system has Python or not. Otherwise, the build system simply tests whether Python is available on the host. The PYLIB variable is also changed
@@ -16,23 +16,29 @@ The issues fixed are : provide the correct Python module location for the target. Signed-off-by: Thomas Petazzoni <[email protected]> +Signed-off-by: Alexey Brodkin <[email protected]> +Cc: Peter Korsgaard <[email protected]> +--- + Makefile | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) -Index: rt-tests/Makefile -=================================================================== ---- rt-tests.orig/Makefile -+++ rt-tests/Makefile -@@ -14,15 +14,11 @@ +diff --git a/Makefile b/Makefile +index 318a5c6..645d138 100644 +--- a/Makefile ++++ b/Makefile +@@ -14,17 +14,13 @@ bindir ?= $(prefix)/bin mandir ?= $(prefix)/share/man srcdir ?= $(prefix)/src --machinetype = $(shell uname -m | \ -- sed -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/') +-machinetype = $(shell $(CC) -dumpmachine | \ +- sed -e 's/-.*//' -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/') -ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),) -NUMA := 1 -endif - --CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include -+override CFLAGS += -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include + CFLAGS ?= -Wall -Wno-nonnull + CPPFLAGS += -D_GNU_SOURCE -Isrc/include + LDFLAGS ?= -PYLIB := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') +ifeq ($(HASPYTHON),1)
@@ -41,3 +47,6 @@ Index: rt-tests/Makefile ifndef DEBUG CFLAGS += -O2 +-- +1.9.3 +
package/rt-tests/02-uclibc.patch +41 -35
127 lines not on this page · raw message
package/rt-tests/rt-tests.mk +1 -1
@@ -5,7 +5,7 @@ ################################################################################ RT_TESTS_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git -RT_TESTS_VERSION = v0.83 +RT_TESTS_VERSION = v0.89 RT_TESTS_LICENSE = GPLv2+ RT_TESTS_LICENSE_FILES = COPYING
Signature · 1 line
1.9.3
PATCH 4/4 rt-tests: allow building subset of tests with non-NPTL toolchains
In reply to Alexey BrodkinSome architectures are still stuck with non-NPTL toolchains. These are for example ARC, Blackfin, Xtensa etc.
Still rt-tests are very good benchmarks and it would be good to enable use of at least selected (those that will be built) tests on those architectures.
This change makes it possible to only build subset of tests that don't require NPTL calls.
Following tests will be built with non-NPTL toolchain:
* signaltest
* ptsematest
* sigwaittest
* svsematest
* sendme
* hackbench
03-fix-non-nptl-buil.patch was submitted upstream:
https://www.mail-archive.com/linux-kernel at vger.kernel.org/msg762958.html so as soon as it is accepted with the next version bump this patch should be removed.
--- package/rt-tests/03-fix-non-nptl-buil.patch | 55 +++++++++++++++++++++++++++++ package/rt-tests/Config.in | 4 --- package/rt-tests/rt-tests.mk | 6 ++++ 3 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 package/rt-tests/03-fix-non-nptl-buil.patch
package/rt-tests/03-fix-non-nptl-buil.patch new file +55 -0
@@ -0,0 +1,55 @@ +From c6920f97be02ca3fba9320b043acd578ce4c62d8 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin <[email protected]> +Date: Mon, 10 Nov 2014 10:00:13 +0300 +Subject: [PATCH] Makefile: allow building selected tests with non-NPTL + toolchain + +Some architectures are still stuck with non-NPTL toolchains. +These are for example ARC, Blackfin, Xtensa etc. + +Still rt-tests are very good benchmarks and it would be good to enable use of +at least selected (those that will be built) tests on those architectures. + +This change makes it possible to only build subset of tests that don't require +NPTL calls. + +By default behavior is not modified - all tests are built, but if one wants +to build with non-NPTL toolchain just add "HAVE_NPTL=no" in command line +or modify "HAVE_NPTL" variable right in Makefile and execute "make". + +This patch was submitted upstream: +https://www.mail-archive.com/linux-kernel at vger.kernel.org/msg762958.html +so as soon as it is accepted with the next version bump this patch should be +removed. + +Signed-off-by: Alexey Brodkin <[email protected]> +Cc: Vineet Gupta <[email protected]> +Cc: Clark Williams <[email protected]> +--- + Makefile | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 318a5c6..675edf7 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,13 @@ + VERSION_STRING = 0.89 + +-sources = cyclictest.c signaltest.c pi_stress.c rt-migrate-test.c \ +- ptsematest.c sigwaittest.c svsematest.c pmqtest.c sendme.c \ +- pip_stress.c hackbench.c ++HAVE_NPTL ?= yes ++ ++ifeq ($(HAVE_NPTL),yes) ++sources = cyclictest.c pi_stress.c pip_stress.c pmqtest.c rt-migrate-test.c ++endif ++ ++sources += signaltest.c ptsematest.c sigwaittest.c svsematest.c sendme.c \ ++ hackbench.c + + TARGETS = $(sources:.c=) + +-- +1.9.3 +
package/rt-tests/Config.in +0 -4
@@ -1,7 +1,5 @@ config BR2_PACKAGE_RT_TESTS bool "rt-tests" - # no _tid field in 'struct sigevent' - depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL help Set of utilities for testing the real-time behaviour of a Linux system.
@@ -26,5 +24,3 @@ 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" - depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
package/rt-tests/rt-tests.mk +6 -0
@@ -13,15 +13,21 @@ ifeq ($(BR2_PACKAGE_PYTHON),y) RT_TESTS_DEPENDENCIES = python endif +ifneq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y) +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/) \
Signature · 1 line
1.9.3
PATCH 4/4 rt-tests: allow building subset of tests with non-NPTL toolchains
Dear Alexey Brodkin,
package/rt-tests/Config.in line 4
Quoted 9 lines · Alexey Brodkin
package/rt-tests/Config.in +0
-2@@ -1,7 +1,5 @@ config BR2_PACKAGE_RT_TESTS bool "rt-tests" - # no _tid field in 'struct sigevent' - depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
And it doesn't need thread support at all?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 4/4 rt-tests: allow building subset of tests with non-NPTL toolchains
Hi Thomas,
Quoted 4 lines · Thomas Petazzoni
Dear Alexey Brodkin,
On Mon, 10 Nov 2014 12:59:09 +0300, Alexey Brodkin wrote:
Quoted 11 lines
package/rt-tests/Config.in line 4
Quoted 9 lines
package/rt-tests/Config.in +0
-2@@ -1,7 +1,5 @@ config BR2_PACKAGE_RT_TESTS bool "rt-tests" - # no _tid field in 'struct sigevent' - depends on BR2_TOOLCHAIN_HAS_THREADS_NPTLAnd it doesn't need thread support at all?
Indeed, threads are required.
So I should have put dependency on BR2_TOOLCHAIN_HAS_THREADS.
Thanks for pointing to this mistake.
If other patches for rt-tests are OK then I'll re-submit only the last one.
-Alexey
Thomas Petazzoni
Appliedcover rt-tests: patches rename & versoin bump & support of non-NPTL tools
In reply to Alexey BrodkinDear Alexey Brodkin,
Quoted 5 lines · Alexey Brodkin
Alexey Brodkin (4):
rt-tests: rename patch to the new convention
rt-tests: switch site from Debian snapshot to Linux's git
rt-tests: bump version to 0.89
rt-tests: allow building subset of tests with non-NPTL toolchains
Applied patches 1 to 3. Patch 4 not applied as a new version was sent. However, I wanted to mention two things:
* You should never resend a new version of just one patch. Always send the complete series again, even if only one patch has changed. I was mistaken when looking at patchwork, and originally only applied the patch removing the NPTL dependency, because it was available standalone, outside of any series.
* You should use 'git format-patch -M' to enable rename detection. It would have made patch 1 a lot smaller, and easier to review.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
cover rt-tests: patches rename & versoin bump & support of non-NPTL tools
Hi Thomas,
Quoted 10 lines · Thomas Petazzoni
Dear Alexey Brodkin,
Quoted 5 lines · Alexey Brodkin
Alexey Brodkin (4):
rt-tests: rename patch to the new convention
rt-tests: switch site from Debian snapshot to Linux's git
rt-tests: bump version to 0.89
rt-tests: allow building subset of tests with non-NPTL toolchains
Quoted 8 lines
Applied patches 1 to 3. Patch 4 not applied as a new version was sent. However, I wanted to mention two things:
* You should never resend a new version of just one patch. Always send the complete series again, even if only one patch has changed. I was mistaken when looking at patchwork, and originally only applied the patch removing the NPTL dependency, because it was available standalone, outside of any series.
Indeed my bad, I was not sure if I may re-send only 1 patch so I asked if that's ok but never got an answer here
http://permalink.gmane.org/gmane.comp.lib.uclibc.buildroot/99171
Nevertheless I understand that that's my fault and I'll try to not do such silly things in the future, so thanks for this comment.
Quoted 2 lines
* You should use 'git format-patch -M' to enable rename detection. It would have made patch 1 a lot smaller, and easier to review.
Hm, I didn't know about this actually.
I did "git mv" and believed that there's nothing else I may do to simplify rename changes. Will do it this way next time.
-Alexey
cover rt-tests: patches rename & versoin bump & support of non-NPTL tools
Dear Alexey Brodkin,
Quoted 6 lines · Alexey Brodkin
Quoted 5 lines
* You should never resend a new version of just one patch. Always send the complete series again, even if only one patch has changed. I was mistaken when looking at patchwork, and originally only applied the patch removing the NPTL dependency, because it was available standalone, outside of any series.
Quoted 6 lines
Indeed my bad, I was not sure if I may re-send only 1 patch so I asked if that's ok but never got an answer here
http://permalink.gmane.org/gmane.comp.lib.uclibc.buildroot/99171Nevertheless I understand that that's my fault and I'll try to not do such silly things in the future, so thanks for this comment.
No problem! Everybody learns progressively how to do things :)
Quoted 6 lines
Quoted 2 lines
* You should use 'git format-patch -M' to enable rename detection. It would have made patch 1 a lot smaller, and easier to review.
Hm, I didn't know about this actually.
I did "git mv" and believed that there's nothing else I may do to simplify rename changes. Will do it this way next time.
I must confess that I don't actually don't know precisely how git encodes renames. But basically, my understanding is that even if you do "git mv", "git format-patch" will encode a rename as a complete removal
+ a complete addition, because that's the only way, in the traditional patch format, to express a rename. However, by passing -M to git format-patch, you tell git that it can generate a git patch, making the assumption that it's git that will be used to apply the patch, and not just the basic "patch" tool. In this case, it can encode the rename in a smarter way.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
cover rt-tests: patches rename & versoin bump & support of non-NPTL tools
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 2 lines
I must confess that I don't actually don't know precisely how git encodes renames. But basically, my understanding is that even if you do
Easy, it doesn't. It just stores blobs and the old and new files will share the same blob as they are identical. The rename detection is only for how you want the commit to PRESENTED.
Quoted 7 lines
"git mv", "git format-patch" will encode a rename as a complete removal
+ a complete addition, because that's the only way, in the traditional patch format, to express a rename. However, by passing -M to git format-patch, you tell git that it can generate a git patch, making the assumption that it's git that will be used to apply the patch, and not just the basic "patch" tool. In this case, it can encode the rename in a smarter way.
Indeed. You can enable it by default with something like:
git config --global diff.renames copy
Signature · 1 line
Bye, Peter Korsgaard
cover rt-tests: patches rename & versoin bump & support of non-NPTL tools
Dear Peter Korsgaard,
Quoted 3 lines · Peter Korsgaard
Indeed. You can enable it by default with something like:
git config --global diff.renames copy
Ah, yes, that's what I have in my ~/.gitconfig, which explains why I never use "git format-patch -M" and still have proper rename detection enabled for all the patches I send. Something I must have enabled years ago, and I forgot about it.
Thanks for the clarification anyway,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com