From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 134124C96 for ; Wed, 6 Mar 2019 10:20:47 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2019 01:20:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,447,1544515200"; d="scan'208";a="325864501" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga005.fm.intel.com with ESMTP; 06 Mar 2019 01:20:45 -0800 Received: from wgcvswdev001.ir.intel.com (wgcvswdev001.ir.intel.com [10.102.246.100]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id x269KjqL028510; Wed, 6 Mar 2019 09:20:45 GMT Received: from wgcvswdev001.ir.intel.com (localhost [127.0.0.1]) by wgcvswdev001.ir.intel.com with ESMTP id x269K6ft014365; Wed, 6 Mar 2019 09:20:06 GMT Received: (from agalyabx@localhost) by wgcvswdev001.ir.intel.com with œ id x269K66S014359; Wed, 6 Mar 2019 09:20:06 GMT From: Agalya Babu RadhaKrishnan To: dev@dpdk.org Cc: reshma.pattan@intel.com, bruce.richardson@intel.com, Agalya Babu RadhaKrishnan Date: Wed, 6 Mar 2019 09:19:36 +0000 Message-Id: <1551863976-14093-1-git-send-email-agalyax.babu.radhakrishnan@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] app/test: enhance meson test run for FreeBSD and Linux X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 09:20:48 -0000 From: Agalya Babu RadhaKrishnan 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 --- 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