From patchwork Mon Nov 10 09:59:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 408702 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 124B5140147 for ; Mon, 10 Nov 2014 20:59:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3422C920BA; Mon, 10 Nov 2014 09:59:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vnIHnOns-oyv; Mon, 10 Nov 2014 09:59:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CED2691F94; Mon, 10 Nov 2014 09:59:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id EAC661C21E1 for ; Mon, 10 Nov 2014 09:59:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E34D03396A for ; Mon, 10 Nov 2014 09:59:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QMzhSFrlmhYT for ; Mon, 10 Nov 2014 09:59:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (us01smtprelay-2.synopsys.com [198.182.60.111]) by silver.osuosl.org (Postfix) with ESMTPS id DD6462EF47 for ; Mon, 10 Nov 2014 09:59:26 +0000 (UTC) Received: from us01secmta1.synopsys.com (us01secmta1.synopsys.com [10.9.203.100]) by smtprelay.synopsys.com (Postfix) with ESMTP id 414A110C0495; Mon, 10 Nov 2014 01:59:26 -0800 (PST) Received: from us01secmta1.internal.synopsys.com (us01secmta1.internal.synopsys.com [127.0.0.1]) by us01secmta1.internal.synopsys.com (Service) with ESMTP id 34B4F27113; Mon, 10 Nov 2014 01:59:26 -0800 (PST) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by us01secmta1.internal.synopsys.com (Service) with ESMTP id E6A0D27102; Mon, 10 Nov 2014 01:59:25 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id D43ED884; Mon, 10 Nov 2014 01:59:25 -0800 (PST) Received: from abrodkin-8560l.internal.synopsys.com (unknown [10.121.8.116]) by mailhost.synopsys.com (Postfix) with ESMTP id 5B37B872; Mon, 10 Nov 2014 01:59:24 -0800 (PST) From: Alexey Brodkin To: buildroot@buildroot.org Date: Mon, 10 Nov 2014 12:59:09 +0300 Message-Id: <1415613549-2886-5-git-send-email-abrodkin@synopsys.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1415613549-2886-1-git-send-email-abrodkin@synopsys.com> References: <1415613549-2886-1-git-send-email-abrodkin@synopsys.com> Cc: Thomas Petazzoni , Alexey Brodkin Subject: [Buildroot] [PATCH 4/4] rt-tests: allow building subset of tests with non-NPTL toolchains X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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. 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@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 Cc: Thomas Petazzoni Cc: Peter Korsgaard Cc: Arnout Vandecappelle Cc: Gustavo Zacarias --- 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 diff --git a/package/rt-tests/03-fix-non-nptl-buil.patch b/package/rt-tests/03-fix-non-nptl-buil.patch new file mode 100644 index 0000000..5c65018 --- /dev/null +++ b/package/rt-tests/03-fix-non-nptl-buil.patch @@ -0,0 +1,55 @@ +From c6920f97be02ca3fba9320b043acd578ce4c62d8 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +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@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 +Cc: Vineet Gupta +Cc: Clark Williams +--- + 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 + diff --git a/package/rt-tests/Config.in b/package/rt-tests/Config.in index 81e5d06..23cc284 100644 --- a/package/rt-tests/Config.in +++ b/package/rt-tests/Config.in @@ -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 diff --git a/package/rt-tests/rt-tests.mk b/package/rt-tests/rt-tests.mk index 4cd99c0..1980556 100644 --- a/package/rt-tests/rt-tests.mk +++ b/package/rt-tests/rt-tests.mk @@ -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/) \