From patchwork Thu Aug 4 13:18:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 73273 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1389673qga; Thu, 4 Aug 2016 06:18:28 -0700 (PDT) X-Received: by 10.55.141.193 with SMTP id p184mr6571282qkd.94.1470316708304; Thu, 04 Aug 2016 06:18:28 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b1si8202548qte.69.2016.08.04.06.18.27; Thu, 04 Aug 2016 06:18:28 -0700 (PDT) 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 904F860685; Thu, 4 Aug 2016 13:18:27 +0000 (UTC) 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 1D5C26067F; Thu, 4 Aug 2016 13:18:22 +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 1206C60681; Thu, 4 Aug 2016 13:18:20 +0000 (UTC) Received: from mail-qt0-f175.google.com (mail-qt0-f175.google.com [209.85.216.175]) by lists.linaro.org (Postfix) with ESMTPS id 29EC06067C for ; Thu, 4 Aug 2016 13:18:18 +0000 (UTC) Received: by mail-qt0-f175.google.com with SMTP id w38so158763703qtb.0 for ; Thu, 04 Aug 2016 06:18:18 -0700 (PDT) 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; bh=VMxg2XIRHb6cGApbfzd+1QqUprJ9xjabuXvKNGg1Xag=; b=l6IRoheGVI3+MtoVeElX3ZtHIPTzzhR04YrKi8T4QBg7vr4G/Rv0IGC2JkxdAf6bvb VBc6jcll/ON5TvNSB+Jtc/UKEFyK+7VeR3vMpheN4ikpq4FXXmYZKdYlgbhd+7wwLStQ mVU9sN7PUAOwstLswl3W2LOktdY2oUACs7ygZRUNjL6J5MtvRxkR8L1r/W/rnsXr+7Z1 jkZcxA0gz0ztV5lNRMMG2THjxmvC1EJ9ckfo5fxadvphgA23ACozFXH2uenHxxtDoayu 4cLVO4p6Rs0dHpSsnLhEQGJY81yKYkEpuYVfD6XPZ0MkYMwi47hVIodb24XeWaoS5mLm I/SQ== X-Gm-Message-State: AEkooutLRVrlhjA7DLwdhHHMqBUeNgi1PtvEMKkp+z45qN1BM36z9HkG0kkVn3Sxi9jIzvygz/g= X-Received: by 10.200.36.83 with SMTP id d19mr6296255qtd.94.1470316697513; Thu, 04 Aug 2016 06:18:17 -0700 (PDT) Received: from localhost (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id t7sm6902722qkh.14.2016.08.04.06.18.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Aug 2016 06:18:16 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Thu, 4 Aug 2016 09:18:14 -0400 Message-Id: <1470316694-17100-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: patch Subject: [lng-odp] [PATCH] test:linux-generic: run odp_scheduling in process mode 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Set up the environment to allow calling the performance tests in process mode as part of make check when enabled. To run the tests use --enable-test-perf-proc Initial patch using odp_scheduling as a proof Signed-off-by: Mike Holmes --- configure.ac | 2 ++ test/linux-generic/Makefile.am | 2 +- test/linux-generic/m4/configure.m4 | 5 ++++- test/linux-generic/m4/performance.m4 | 9 ++++++++ test/linux-generic/performance/.gitignore | 2 ++ test/linux-generic/performance/Makefile.am | 13 +++++++++++ .../performance/odp_scheduling_run_proc.sh | 26 ++++++++++++++++++++++ 7 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 test/linux-generic/m4/performance.m4 create mode 100644 test/linux-generic/performance/.gitignore create mode 100644 test/linux-generic/performance/Makefile.am create mode 100755 test/linux-generic/performance/odp_scheduling_run_proc.sh -- 2.7.4 Reviewed-by: Brian Brooks diff --git a/configure.ac b/configure.ac index c0f0f21..6551287 100644 --- a/configure.ac +++ b/configure.ac @@ -169,6 +169,7 @@ AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ]) AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ]) +AM_CONDITIONAL([test_perf_proc], [test x$test_perf_proc = xyes ]) AM_CONDITIONAL([test_cpp], [test x$test_cpp = xyes ]) AM_CONDITIONAL([test_helper], [test x$test_helper = xyes ]) AM_CONDITIONAL([test_example], [test x$test_example = xyes ]) @@ -302,6 +303,7 @@ AC_MSG_RESULT([ cunit: ${cunit_support} test_vald: ${test_vald} test_perf: ${test_perf} + test_perf_proc: ${test_perf_proc} test_cpp: ${test_cpp} test_helper: ${test_helper} test_example: ${test_example} diff --git a/test/linux-generic/Makefile.am b/test/linux-generic/Makefile.am index f5cc52d..4660cf0 100644 --- a/test/linux-generic/Makefile.am +++ b/test/linux-generic/Makefile.am @@ -3,7 +3,7 @@ TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/common_plat/validation ALL_API_VALIDATION_DIR = ${top_builddir}/test/common_plat/validation/api -SUBDIRS = +SUBDIRS = performance if test_vald TESTS = validation/api/pktio/pktio_run.sh \ diff --git a/test/linux-generic/m4/configure.m4 b/test/linux-generic/m4/configure.m4 index 9eec545..6b92201 100644 --- a/test/linux-generic/m4/configure.m4 +++ b/test/linux-generic/m4/configure.m4 @@ -1,5 +1,8 @@ +m4_include([test/linux-generic/m4/performance.m4]) + AC_CONFIG_FILES([test/linux-generic/Makefile test/linux-generic/validation/api/shmem/Makefile test/linux-generic/validation/api/pktio/Makefile test/linux-generic/pktio_ipc/Makefile - test/linux-generic/ring/Makefile]) + test/linux-generic/ring/Makefile + test/linux-generic/performance/Makefile]) diff --git a/test/linux-generic/m4/performance.m4 b/test/linux-generic/m4/performance.m4 new file mode 100644 index 0000000..7f54b96 --- /dev/null +++ b/test/linux-generic/m4/performance.m4 @@ -0,0 +1,9 @@ +########################################################################## +# Enable/disable test-perf-proc +########################################################################## +test_perf_proc=no +AC_ARG_ENABLE([test-perf-proc], + [ --enable-test-perf-proc run test in test/performance in process mode], + [if test "x$enableval" = "xyes"; then + test_perf_proc=yes + fi]) diff --git a/test/linux-generic/performance/.gitignore b/test/linux-generic/performance/.gitignore new file mode 100644 index 0000000..7e563b8 --- /dev/null +++ b/test/linux-generic/performance/.gitignore @@ -0,0 +1,2 @@ +*.log +*.trs diff --git a/test/linux-generic/performance/Makefile.am b/test/linux-generic/performance/Makefile.am new file mode 100644 index 0000000..cb72fce --- /dev/null +++ b/test/linux-generic/performance/Makefile.am @@ -0,0 +1,13 @@ +include $(top_srcdir)/test/Makefile.inc + +TESTS_ENVIRONMENT += TEST_DIR=${builddir} + +TESTSCRIPTS = odp_scheduling_run_proc.sh + +TEST_EXTENSIONS = .sh + +if test_perf_proc +TESTS = $(TESTSCRIPTS) +endif + +EXTRA_DIST = $(TESTSCRIPTS) diff --git a/test/linux-generic/performance/odp_scheduling_run_proc.sh b/test/linux-generic/performance/odp_scheduling_run_proc.sh new file mode 100755 index 0000000..b3ef26f --- /dev/null +++ b/test/linux-generic/performance/odp_scheduling_run_proc.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (c) 2016, 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)}" +PERFORMANCE="$TEST_DIR/../../common_plat/performance" +ret=0 + +run() +{ + echo odp_scheduling_run_proc starts with $1 worker threads + echo ===================================================== + + $PERFORMANCE/odp_scheduling${EXEEXT} --odph_proc -c $1 || ret=1 +} + +run 1 +run 8 + +exit $ret