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 5CAD7A32A1 for ; Thu, 24 Oct 2019 10:58:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 443451E88E; Thu, 24 Oct 2019 10:58:20 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 254D31E88D for ; Thu, 24 Oct 2019 10:58:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2019 01:58:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,224,1569308400"; d="scan'208";a="188528266" Received: from dpdk-meijuan2.sh.intel.com ([10.67.119.197]) by orsmga007.jf.intel.com with ESMTP; 24 Oct 2019 01:58:17 -0700 From: hanyingya To: dts@dpdk.org Cc: hanyingya Date: Thu, 24 Oct 2019 16:57:44 +0000 Message-Id: <20191024165744.73427-1-yingyax.han@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1]tests/multiple_pthread: replace the hard code 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" replace the hard code and support for more platforms. Signed-off-by: hanyingya --- tests/TestSuite_multiple_pthread.py | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/TestSuite_multiple_pthread.py b/tests/TestSuite_multiple_pthread.py index 1ea71a5..b59f047 100644 --- a/tests/TestSuite_multiple_pthread.py +++ b/tests/TestSuite_multiple_pthread.py @@ -130,7 +130,7 @@ class TestMultiplePthread(TestCase): self.result_table_create(header_row) self.out_view['data'] = [] - cmdline = './x86_64-native-linuxapp-gcc/app/testpmd --lcores="%s" -n 4 -- -i' % lcores + cmdline = './%s/app/testpmd --lcores="%s" -n 4 -- -i' % (self.target, lcores) # start application self.dut.send_expect(cmdline, "testpmd", 60) @@ -206,25 +206,25 @@ class TestMultiplePthread(TestCase): """ Test an random parameter from an defined table which has a couple of invalid lcore parameters. """ - cmdline_list = ["./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0-,4-7)@(4,5)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(-1,4-7)@(4,5)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7-9)@(4,5)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,abcd)@(4,5)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(1-,5)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(-1,5)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(4,5-8-9)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(abc,5)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(4,xyz)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)=(8,9)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='2,3 at 4,(0-1,,4))' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='[0-,4-7]@(4,5)' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0-,4-7)@[4,5]' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='3-4 at 3,2 at 5-6' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='2,,3''2--3' -n 4 -- -i", - "./x86_64-native-linuxapp-gcc/app/testpmd --lcores='2,,,3''2--3' -n 4 -- -i"] + 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 = random.sample(cmdline_list, 1) - out = self.dut.send_expect(cmdline[0], "#", 60) + out = self.dut.send_expect(cmdline[0] % self.target, "#", 60) self.verify("invalid parameter" in out, "it's a valid parameter") def tear_down(self): -- 2.17.1