From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 470C8A04C5; Fri, 4 Sep 2020 10:17:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 40AE51C0CA; Fri, 4 Sep 2020 10:17:30 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E1FBADE0 for ; Fri, 4 Sep 2020 10:17:27 +0200 (CEST) IronPort-SDR: hjVUw8Uo5RjchHnCwGDO+sC/PKn5wT3vUIYHnB52YSj0kNpcHetOCDeqEUj+ARH+zhv/j/GY0u af+1ROn5+Dtw== X-IronPort-AV: E=McAfee;i="6000,8403,9733"; a="175763290" X-IronPort-AV: E=Sophos;i="5.76,389,1592895600"; d="scan'208";a="175763290" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2020 01:17:26 -0700 IronPort-SDR: rNACanqpS3AaxpGfRUYO5MsO81ZyZSOKDGIM4qM0bE3az/MtORuBisLv6FYUygHHgYT0l4H3YG 2cavdqgy5TdQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,389,1592895600"; d="scan'208";a="315782669" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.182.150]) by orsmga002.jf.intel.com with ESMTP; 04 Sep 2020 01:17:25 -0700 From: xizhan4x To: dts@dpdk.org Cc: xizhan4x Date: Fri, 4 Sep 2020 16:18:24 +0800 Message-Id: <1599207525-22123-17-git-send-email-xix.zhang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1599207525-22123-1-git-send-email-xix.zhang@intel.com> References: <1599207525-22123-1-git-send-email-xix.zhang@intel.com> Subject: [dts] [dts 17/38] tests/TestSuite_multiple_pthread.py:support meson build X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: xizhan4x --- tests/TestSuite_multiple_pthread.py | 42 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/tests/TestSuite_multiple_pthread.py b/tests/TestSuite_multiple_pthread.py index 83ab7bd..d46ac70 100644 --- a/tests/TestSuite_multiple_pthread.py +++ b/tests/TestSuite_multiple_pthread.py @@ -56,6 +56,7 @@ class TestMultiplePthread(TestCase): self.cores = self.dut.get_core_list("1S/8C/1T", socket=self.socket) self.verify(self.cores is not None, "Requested 8 cores failed") self.out_view = {'header': [], 'data': []} + self.path=self.dut.apps_name["test-pmd"].rstrip() def set_up(self): """ @@ -80,7 +81,8 @@ class TestMultiplePthread(TestCase): Get cpu and thread statistics. """ mutiple_pthread_session = self.dut.new_session() - out = mutiple_pthread_session.send_expect("ps -C testpmd -L -opid,tid,%cpu,psr,args", "#", 20) + testpmd_name = self.path.split("/")[-1] + out = mutiple_pthread_session.send_expect(f"ps -C {testpmd_name} -L -opid,tid,%cpu,psr,args", "#", 20) m = cmdline.replace('"', '', 2) out_list = out.split(m) mutiple_pthread_session.send_expect("^C", "#") @@ -127,9 +129,9 @@ class TestMultiplePthread(TestCase): # Allocate enough streams based on the number of CPUs if len(cpu_list) > 2: queue_num = len(cpu_list) - cmdline = './%s/app/testpmd --lcores="%s" -n 4 -- -i --txq=%d --rxq=%d' % (self.target, lcores, queue_num, queue_num) + cmdline = './%s --lcores="%s" -n 4 -- -i --txq=%d --rxq=%d' % (self.path, lcores, queue_num, queue_num) else: - cmdline = './%s/app/testpmd --lcores="%s" -n 4 -- -i' % (self.target, lcores) + cmdline = './%s --lcores="%s" -n 4 -- -i' % (self.path, lcores) # start application self.dut.send_expect(cmdline, "testpmd", 60) @@ -203,25 +205,25 @@ class TestMultiplePthread(TestCase): """ Test an random parameter from an defined table which has a couple of invalid lcore parameters. """ - cmdline_list = ["./%s/app/testpmd --lcores='(0-,4-7)@(4,5)' -n 4 -- -i", - "./%s/app/testpmd --lcores='(-1,4-7)@(4,5)' -n 4 -- -i", - "./%s/app/testpmd --lcores='(0,4-7-9)@(4,5)' -n 4 -- -i", - "./%s/app/testpmd --lcores='(0,abcd)@(4,5)' -n 4 -- -i", - "./%s/app/testpmd --lcores='(0,4-7)@(1-,5)' -n 4 -- -i", - "./%s/app/testpmd --lcores='(0,4-7)@(-1,5)' -n 4 -- -i", - "./%s/app/testpmd --lcores='(0,4-7)@(4,5-8-9)' -n 4 -- -i", - "./%s/app/testpmd --lcores='(0,4-7)@(abc,5)' -n 4 -- -i", - "./%s/app/testpmd --lcores='(0,4-7)@(4,xyz)' -n 4 -- -i", - "./%s/app/testpmd --lcores='(0,4-7)=(8,9)' -n 4 -- -i", - "./%s/app/testpmd --lcores='2,3 at 4,(0-1,,4))' -n 4 -- -i", - "./%s/app/testpmd --lcores='[0-,4-7]@(4,5)' -n 4 -- -i", - "./%s/app/testpmd --lcores='(0-,4-7)@[4,5]' -n 4 -- -i", - "./%s/app/testpmd --lcores='3-4 at 3,2 at 5-6' -n 4 -- -i", - "./%s/app/testpmd --lcores='2,,3''2--3' -n 4 -- -i", - "./%s/app/testpmd --lcores='2,,,3''2--3' -n 4 -- -i"] + cmdline_list = ["./%s --lcores='(0-,4-7)@(4,5)' -n 4 -- -i", + "./%s --lcores='(-1,4-7)@(4,5)' -n 4 -- -i", + "./%s --lcores='(0,4-7-9)@(4,5)' -n 4 -- -i", + "./%s --lcores='(0,abcd)@(4,5)' -n 4 -- -i", + "./%s --lcores='(0,4-7)@(1-,5)' -n 4 -- -i", + "./%s --lcores='(0,4-7)@(-1,5)' -n 4 -- -i", + "./%s --lcores='(0,4-7)@(4,5-8-9)' -n 4 -- -i", + "./%s --lcores='(0,4-7)@(abc,5)' -n 4 -- -i", + "./%s --lcores='(0,4-7)@(4,xyz)' -n 4 -- -i", + "./%s --lcores='(0,4-7)=(8,9)' -n 4 -- -i", + "./%s --lcores='2,3 at 4,(0-1,,4))' -n 4 -- -i", + "./%s --lcores='[0-,4-7]@(4,5)' -n 4 -- -i", + "./%s --lcores='(0-,4-7)@[4,5]' -n 4 -- -i", + "./%s --lcores='3-4 at 3,2 at 5-6' -n 4 -- -i", + "./%s --lcores='2,,3''2--3' -n 4 -- -i", + "./%s --lcores='2,,,3''2--3' -n 4 -- -i",] cmdline = random.sample(cmdline_list, 1) - out = self.dut.send_expect(cmdline[0] % self.target, "#", 60) + out = self.dut.send_expect(cmdline[0]%self.path, "#", 60) self.verify("invalid parameter" in out, "it's a valid parameter") def tear_down(self): -- 1.8.3.1