From patchwork Wed Jan 6 18:57:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 59259 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp102422lbb; Wed, 6 Jan 2016 10:58:21 -0800 (PST) X-Received: by 10.140.130.22 with SMTP id 22mr132789014qhc.99.1452106701490; Wed, 06 Jan 2016 10:58:21 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z139si12006286qka.98.2016.01.06.10.58.21; Wed, 06 Jan 2016 10:58:21 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 165FB6194A; Wed, 6 Jan 2016 18:58:21 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=XhVkFtaL; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 80E3B61941; Wed, 6 Jan 2016 18:57:28 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 584A261930; Wed, 6 Jan 2016 18:57:25 +0000 (UTC) Received: from mail-qk0-f182.google.com (mail-qk0-f182.google.com [209.85.220.182]) by lists.linaro.org (Postfix) with ESMTPS id 6AE9761915 for ; Wed, 6 Jan 2016 18:57:24 +0000 (UTC) Received: by mail-qk0-f182.google.com with SMTP id h11so16251571qke.1 for ; Wed, 06 Jan 2016 10:57:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hUGGwOp9CyTbUJPV7tW1+JoyxpPcVfvbko6VA1fQWBM=; b=XhVkFtaLaELTjRJqjR5GCy4/UiupILhBdrSueJmorFjCF3nITa8Y4C+fm8ynXw9jdQ VDx6f/vjRilfHsO2cpRtuIqr9T9F+ZRncnC/C1Mr6wOH0dYDrKD/oOs1vevk5GUQmPv7 /+n6AEajpCrer/F0CPMrzKYmf0DvtrOY5pDiM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hUGGwOp9CyTbUJPV7tW1+JoyxpPcVfvbko6VA1fQWBM=; b=genDpgGzb05b5/Jj9dl4nwjK2zNnd51OvyuSmYaosZMmMylyo4al/Guu7HfUEt8r/S yuPfIToFzlgyERpXrwx5NWz09fA6qFw2qdjjNJ+YOYZ+q+RY/1zBlf9VcwzYKvxEuhBl Vv9DYvwokrXWXqfph1DQgr7+32cWe99jZbFl4+Fr7wrEpuShRuy8Iq/vzZP9l2echllS rr71WOYkEK22tzKxumqjDaQdsEhg33ZEkB2GOdn8lcUys9jdJXlsU88DeNIT6Sl0KLbC M4Za96U/6rfEXc84haqJRAYKGHGthIAyZycrNEizwuOkN4+V6ZMq/IFwsPoCt+dNbdvg /xdA== X-Gm-Message-State: ALoCoQlTiIJzcvFVkR0vdE5V8dhjL53O+gDWI6NZMrwaEzGgUSDWJvR5XBEkRmctjXIPoEaGT0s805vUqFqyUGOQa/onwkiUig== X-Received: by 10.55.71.143 with SMTP id u137mr132247740qka.1.1452106644172; Wed, 06 Jan 2016 10:57:24 -0800 (PST) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id w145sm36117231qhw.36.2016.01.06.10.57.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jan 2016 10:57:23 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 6 Jan 2016 13:57:15 -0500 Message-Id: <1452106635-6881-2-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452106635-6881-1-git-send-email-mike.holmes@linaro.org> References: <1452106635-6881-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v2 2/2] linux-generic: test: add performance test framework X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Add infrastructure for platform dependent performance testing. Added scheduler performance test using process mode. Signed-off-by: Mike Holmes --- v2: drop .../test/performance/tests-performance.env ensure odp_scheduling is installed in testdir platform/linux-generic/m4/configure.m4 | 1 + platform/linux-generic/test/Makefile.am | 4 ++++ .../linux-generic/test/performance/Makefile.am | 13 +++++++++++ .../test/performance/odp_scheduling_proc_run | 25 ++++++++++++++++++++++ test/performance/Makefile.am | 2 +- 5 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 platform/linux-generic/test/performance/Makefile.am create mode 100755 platform/linux-generic/test/performance/odp_scheduling_proc_run diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 97c15fa..82b7c5e 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -23,5 +23,6 @@ m4_include([platform/linux-generic/m4/odp_pcap.m4]) AC_CONFIG_FILES([platform/linux-generic/Makefile platform/linux-generic/test/Makefile + platform/linux-generic/test/performance/Makefile platform/linux-generic/test/validation/Makefile platform/linux-generic/test/validation/pktio/Makefile]) diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am index 3cf638d..7fe79c9 100644 --- a/platform/linux-generic/test/Makefile.am +++ b/platform/linux-generic/test/Makefile.am @@ -4,6 +4,10 @@ if test_vald SUBDIRS += validation endif +if test_perf +SUBDIRS += performance +endif + if test_installdir installcheck-local: $(DESTDIR)/$(testdir)/run-test diff --git a/platform/linux-generic/test/performance/Makefile.am b/platform/linux-generic/test/performance/Makefile.am new file mode 100644 index 0000000..22d46d5 --- /dev/null +++ b/platform/linux-generic/test/performance/Makefile.am @@ -0,0 +1,13 @@ +include $(top_srcdir)/test/Makefile.inc +TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/performance + +TESTS = odp_scheduling_proc_run + +dist_check_SCRIPTS = odp_scheduling_proc_run tests-performance.env + +test_SCRIPTS = $(dist_check_SCRIPTS) + +tests-performance.env: + echo "TESTS=\"$(TESTS)\"" > $@ + echo "$(TESTS_ENVIRONMENT)" >> $@ + echo "$(LOG_COMPILER)" >> $@ diff --git a/platform/linux-generic/test/performance/odp_scheduling_proc_run b/platform/linux-generic/test/performance/odp_scheduling_proc_run new file mode 100755 index 0000000..0fbb5ca --- /dev/null +++ b/platform/linux-generic/test/performance/odp_scheduling_proc_run @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Copyright (c) 2015, Linaro Limited +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Script that passes command line arguments to odp_scheduling test when +# launched by 'make check' + +TEST_DIR="${TEST_DIR:-$(dirname $0)}" +ret=0 + +run() +{ + echo odp_scheduling_proc_run starts with $1 worker threads + echo =============================================== + + $TEST_DIR/odp_scheduling${EXEEXT} -c $1 --proc || ret=1 +} + +run 1 +run 8 + +exit $ret diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am index 721615b..719be2b 100644 --- a/test/performance/Makefile.am +++ b/test/performance/Makefile.am @@ -14,7 +14,7 @@ if test_perf TESTS = $(EXECUTABLES) $(TESTSCRIPTS) endif -bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) +test_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY) odp_atomic_LDFLAGS = $(AM_LDFLAGS) -static odp_atomic_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/test