All of lore.kernel.org
 help / color / mirror / Atom feed
From: Agalya Babu RadhaKrishnan <agalyax.babu.radhakrishnan@intel.com>
To: dev@dpdk.org
Cc: reshma.pattan@intel.com, bruce.richardson@intel.com,
	Agalya Babu RadhaKrishnan <agalyax.babu.radhakrishnan@intel.com>
Subject: [PATCH] app/test: enhance meson test run for FreeBSD and Linux
Date: Wed,  6 Mar 2019 09:19:36 +0000	[thread overview]
Message-ID: <1551863976-14093-1-git-send-email-agalyax.babu.radhakrishnan@intel.com> (raw)

From: Agalya Babu RadhaKrishnan <agalyax.babu.radhakrishnan@intel.com>

1)For linux, running all tests on same cores can increase failure rate.
So instead run each test case on separate lcore using -l EAL option.
Lcore for each test case will be selected in the incremental order
of 0,1,2 ... till it reaches the maximum available cores in the
system which can be known from 'nproc' command.
On the other hand, by default meson runs all tests in parallel in
different threads which can be controlled by MESON_TESTTHREAD option.
eg. MESON_TESTTHREAD=4 meson test --suite DPDK:fast-tests

2)FreeBSD dont support file-prefix, so  changes are made to run the
tests without 'file-prefix'option.
eg. meson test --suite DPDK:fast-tests

Signed-off-by: Agalya Babu RadhaKrishnan <agalyax.babu.radhakrishnan@intel.com>
---
 app/test/meson.build | 28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 05e5ddeb0..8303aaaa6 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -337,11 +337,29 @@ if get_option('tests')
 	timeout_seconds_fast = 10
 
 	foreach arg : fast_parallel_test_names
-		test(arg, dpdk_test,
-			env : ['DPDK_TEST=' + arg],
-			args : ['-c f','-n 4', '--file-prefix=@0@'.format(arg)],
-			timeout : timeout_seconds_fast,
-			suite : 'fast-tests')
+		if host_machine.system() == 'linux'
+			lcore_number = 1
+			cores_running = run_command('nproc')
+			cores_used = cores_running.stdout().to_int()
+			test(arg, dpdk_test,
+				env : ['DPDK_TEST=' + arg],
+				args : ['-l @0@'.format(lcore_number), '-n 4', '--file-prefix=@0@'.format(arg)],
+				timeout : timeout_seconds_fast,
+				suite : 'fast-tests')
+			if (lcore_number < cores_used)
+				lcore_number += 1
+			else
+				lcore_number = 1
+			endif
+		else
+			test(arg, dpdk_test,
+				env : ['DPDK_TEST=' + arg],
+				args : ['-n 4'],
+				is_parallel : false,
+				timeout : timeout_seconds_fast,
+				suite : 'fast-tests')
+		endif
+
 	endforeach
 
 	foreach arg : fast_non_parallel_test_names
-- 
2.17.2

             reply	other threads:[~2019-03-06  9:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06  9:19 Agalya Babu RadhaKrishnan [this message]
2019-04-01 12:32 ` [PATCH] app/test: enhance meson test run for FreeBSD and Linux Pattan, Reshma
2019-04-03 12:23 ` Pattan, Reshma
2019-04-03 12:39 ` David Marchand
2019-04-26 14:53 ` [dpdk-dev] " Pattan, Reshma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1551863976-14093-1-git-send-email-agalyax.babu.radhakrishnan@intel.com \
    --to=agalyax.babu.radhakrishnan@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=reshma.pattan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.