From patchwork Mon Mar 21 18:34:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 64133 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1578519lbc; Mon, 21 Mar 2016 11:35:27 -0700 (PDT) X-Received: by 10.140.196.203 with SMTP id r194mr1447200qha.60.1458585326940; Mon, 21 Mar 2016 11:35:26 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 47si5124991qgd.35.2016.03.21.11.35.26; Mon, 21 Mar 2016 11:35:26 -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 Received: by lists.linaro.org (Postfix, from userid 109) id 821DC61865; Mon, 21 Mar 2016 18:35:26 +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_H2, 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 E425161873; Mon, 21 Mar 2016 18:34:50 +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 4E8FF6185D; Mon, 21 Mar 2016 18:34:43 +0000 (UTC) Received: from mail-qg0-f41.google.com (mail-qg0-f41.google.com [209.85.192.41]) by lists.linaro.org (Postfix) with ESMTPS id 0337961857 for ; Mon, 21 Mar 2016 18:34:41 +0000 (UTC) Received: by mail-qg0-f41.google.com with SMTP id w104so159427164qge.1 for ; Mon, 21 Mar 2016 11:34:41 -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:in-reply-to :references; bh=RurM1F2TMy+kb9tiALlCoaHB2YNTwVjwDi2B8hibg4M=; b=jqS/vnYQgvSLbl+MTDVhr42wPwE0u5fedHnZuFvnJPU5ywuYd/LvbCx66jwcjNiCKR 72mnAa2rC7M6U0MVUPNrSe69WlSzoeNv68vFDtIWMT3rYjMfE0jIT1JeAxV+ZSXdHm8E AgEu4Ze4c8/QKITHzLj27NTjBLxa8hplQWUuLPEG0EiL8b0UTAa+tNah56CuBfEIG05f ZT3wjYzek/8P8kHGNWAOaP6y1p6OC/X2rMLmX/Fg4wZlt48tn1ZoX7eTrQDn58eMPLYW mftETH49MkpF3EguZFggFBF+VC/C8q4NAwIjZCKpTCBpJUV2Olt+YScXApods+duYPfW uAMw== X-Gm-Message-State: AD7BkJIbEKRzEyX7dq2p0OTEP/C7TP34gq4/IkF7B/K9mLzaBP+LEa8leoNRTySCMGRekfRQ7vU= X-Received: by 10.140.43.37 with SMTP id d34mr41496465qga.51.1458585280685; Mon, 21 Mar 2016 11:34:40 -0700 (PDT) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id b103sm12789814qge.2.2016.03.21.11.34.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Mar 2016 11:34:40 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 21 Mar 2016 14:34:05 -0400 Message-Id: <1458585245-31429-3-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1458585245-31429-1-git-send-email-mike.holmes@linaro.org> References: <1458585245-31429-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/2] linux-generic: test: add process mode scheduler test 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 new platform test infrastructure to run the scheduler performance test in process mode. Signed-off-by: Mike Holmes --- platform/linux-generic/m4/configure.m4 | 1 + platform/linux-generic/test/Makefile.am | 2 +- platform/linux-generic/test/performance/.gitignore | 1 + .../linux-generic/test/performance/Makefile.am | 26 ++++++++++++++++++++ .../test/performance/odp_scheduling_proc_run | 28 ++++++++++++++++++++++ 5 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 platform/linux-generic/test/performance/.gitignore 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 8b09a45..7c29093 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -24,5 +24,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 312d18e..1dd0170 100644 --- a/platform/linux-generic/test/Makefile.am +++ b/platform/linux-generic/test/Makefile.am @@ -1 +1 @@ -SUBDIRS = validation +SUBDIRS = validation performance diff --git a/platform/linux-generic/test/performance/.gitignore b/platform/linux-generic/test/performance/.gitignore new file mode 100644 index 0000000..93778a9 --- /dev/null +++ b/platform/linux-generic/test/performance/.gitignore @@ -0,0 +1 @@ +tests-performance.env diff --git a/platform/linux-generic/test/performance/Makefile.am b/platform/linux-generic/test/performance/Makefile.am new file mode 100644 index 0000000..c20df55 --- /dev/null +++ b/platform/linux-generic/test/performance/Makefile.am @@ -0,0 +1,26 @@ +include $(top_srcdir)/test/Makefile.inc +TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/performance + +if test_perf +TESTS = odp_scheduling_proc_run +endif + +dist_check_SCRIPTS = ../run-test tests-performance.env $(LOG_COMPILER) \ + odp_scheduling_proc_run + +test_SCRIPTS = $(dist_check_SCRIPTS) + +if test_installdir +installcheck-local: + $(DESTDIR)/$(testdir)/run-test +endif + + +clean-local: + rm -rf $(builddir)/tests-performance.env + +.PHONY: tests-performance.env +tests-performance.env: + @echo "TESTS=\"$(TESTS)\"" > $@ + @echo "$(TESTS_ENVIRONMENT)" >> $@ + @echo "LOG_COMPILER=\"$(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..1210674 --- /dev/null +++ b/platform/linux-generic/test/performance/odp_scheduling_proc_run @@ -0,0 +1,28 @@ +#!/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)}" + +PATH=${TEST_DIR}:$PATH +PATH=$(dirname $0)/../../../../test/performance:$PATH + +ret=0 + +run() +{ + echo odp_scheduling_proc_run starts with $1 worker threads + echo =============================================== + + odp_scheduling${EXEEXT} -c $1 --proc || ret=1 +} + +run 1 +run 8 + +exit $ret