diff mbox

[V2,2/2] linux-generic: test: add process mode scheduler test

Message ID 1456349098-21774-2-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Feb. 24, 2016, 9:24 p.m. UTC
Add new platform test infrastructure to run the scheduler performance
test in process mode.

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 platform/linux-generic/m4/configure.m4             |  1 +
 platform/linux-generic/test/.gitignore             |  1 -
 platform/linux-generic/test/Makefile.am            |  2 +-
 platform/linux-generic/test/performance/.gitignore |  1 +
 .../linux-generic/test/performance/Makefile.am     | 16 +++++++++++++
 .../test/performance/odp_scheduling_proc_run       | 28 ++++++++++++++++++++++
 platform/linux-generic/test/validation/.gitignore  |  1 +
 7 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100755 platform/linux-generic/test/performance/.gitignore
 create mode 100755 platform/linux-generic/test/performance/Makefile.am
 create mode 100755 platform/linux-generic/test/performance/odp_scheduling_proc_run
 create mode 100644 platform/linux-generic/test/validation/.gitignore

Comments

Christophe Milard Feb. 25, 2016, 8:39 a.m. UTC | #1
On 24 February 2016 at 22:24, Mike Holmes <mike.holmes@linaro.org> wrote:

> Add new platform test infrastructure to run the scheduler performance

> test in process mode.

>

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

> ---

>  platform/linux-generic/m4/configure.m4             |  1 +

>  platform/linux-generic/test/.gitignore             |  1 -

>  platform/linux-generic/test/Makefile.am            |  2 +-

>  platform/linux-generic/test/performance/.gitignore |  1 +

>  .../linux-generic/test/performance/Makefile.am     | 16 +++++++++++++

>  .../test/performance/odp_scheduling_proc_run       | 28

> ++++++++++++++++++++++

>  platform/linux-generic/test/validation/.gitignore  |  1 +

>  7 files changed, 48 insertions(+), 2 deletions(-)

>  create mode 100755 platform/linux-generic/test/performance/.gitignore

>  create mode 100755 platform/linux-generic/test/performance/Makefile.am

>  create mode 100755

> platform/linux-generic/test/performance/odp_scheduling_proc_run

>  create mode 100644 platform/linux-generic/test/validation/.gitignore

>

> 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/.gitignore

> b/platform/linux-generic/test/.gitignore

> index 5dabf91..7e563b8 100644

> --- a/platform/linux-generic/test/.gitignore

> +++ b/platform/linux-generic/test/.gitignore

> @@ -1,3 +1,2 @@

>  *.log

>  *.trs

> -tests-validation.env

> 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 100755

> index 0000000..d95312a

> --- /dev/null

> +++ b/platform/linux-generic/test/performance/.gitignore

> @@ -0,0 +1 @@

> +performance-test.env

> diff --git a/platform/linux-generic/test/performance/Makefile.am

> b/platform/linux-generic/test/performance/Makefile.am

> new file mode 100755

> index 0000000..74b4d4c

> --- /dev/null

> +++ b/platform/linux-generic/test/performance/Makefile.am

> @@ -0,0 +1,16 @@

> +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 performance-test.env $(LOG_COMPILER) \

> +                    odp_scheduling_proc_run

> +

> +test_SCRIPTS = $(dist_check_SCRIPTS)

> +

> +performance-test.env:

> +       echo "TESTS=\"$(TESTS)\""    > $@

> +       echo "$(TESTS_ENVIRONMENT)" >> $@

> +       echo "$(LOG_COMPILER)"      >> $@

>


shouldn't it be echo "LOG_COMPILER=$(LOG_COMPILER" ?. From reading this
code, it feels the LOG_COMPILER feature would not work.
AFAIK, it is not used, but still...
It seems to be the same mistake from the validation side, where you copied
this file from.

Christophe.


> 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

> diff --git a/platform/linux-generic/test/validation/.gitignore

> b/platform/linux-generic/test/validation/.gitignore

> new file mode 100644

> index 0000000..16f0afb

> --- /dev/null

> +++ b/platform/linux-generic/test/validation/.gitignore

> @@ -0,0 +1 @@

> +tests-validation.env

> \ No newline at end of file

> --

> 2.5.0

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>
diff mbox

Patch

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/.gitignore b/platform/linux-generic/test/.gitignore
index 5dabf91..7e563b8 100644
--- a/platform/linux-generic/test/.gitignore
+++ b/platform/linux-generic/test/.gitignore
@@ -1,3 +1,2 @@ 
 *.log
 *.trs
-tests-validation.env
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 100755
index 0000000..d95312a
--- /dev/null
+++ b/platform/linux-generic/test/performance/.gitignore
@@ -0,0 +1 @@ 
+performance-test.env
diff --git a/platform/linux-generic/test/performance/Makefile.am b/platform/linux-generic/test/performance/Makefile.am
new file mode 100755
index 0000000..74b4d4c
--- /dev/null
+++ b/platform/linux-generic/test/performance/Makefile.am
@@ -0,0 +1,16 @@ 
+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 performance-test.env $(LOG_COMPILER) \
+		     odp_scheduling_proc_run
+
+test_SCRIPTS = $(dist_check_SCRIPTS)
+
+performance-test.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..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
diff --git a/platform/linux-generic/test/validation/.gitignore b/platform/linux-generic/test/validation/.gitignore
new file mode 100644
index 0000000..16f0afb
--- /dev/null
+++ b/platform/linux-generic/test/validation/.gitignore
@@ -0,0 +1 @@ 
+tests-validation.env
\ No newline at end of file