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 5E8F5A04DB; Thu, 10 Dec 2020 12:24:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4A99BBE75; Thu, 10 Dec 2020 12:24:09 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C253FBC8A for ; Thu, 10 Dec 2020 12:24:06 +0100 (CET) IronPort-SDR: t6ZCrR5Rg7r/Wzo80zardu5AWbvUjbDe40V0Ri0EPA3LCYtLXGNppe2agaffi5b4CYGp3fHbpi kNccSuUXdERQ== X-IronPort-AV: E=McAfee;i="6000,8403,9830"; a="170731286" X-IronPort-AV: E=Sophos;i="5.78,408,1599548400"; d="scan'208";a="170731286" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2020 03:24:04 -0800 IronPort-SDR: 21+Z+XJmMdXfpDQP34EtTTEDFKKqFdxsuP5aKNN/JhQkIgV138MMbBS4aYfnDqmQUWfopC8bRQ ZqgLKXxZrUFQ== X-IronPort-AV: E=Sophos;i="5.78,408,1599548400"; d="scan'208";a="542805058" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2020 03:24:03 -0800 From: Zhou Jun To: dts@dpdk.org Cc: Zhou Jun Date: Thu, 10 Dec 2020 19:26:55 +0800 Message-Id: <20201210112655.22020-1-junx.w.zhou@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/TestSuite_dynamic_config:Modify the hard coded appparameter 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" Modify the hard coded app parameter to call the platform interface Signed-off-by: Zhou Jun --- tests/TestSuite_dynamic_config.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/TestSuite_dynamic_config.py b/tests/TestSuite_dynamic_config.py index a9c482e5..92f15d36 100644 --- a/tests/TestSuite_dynamic_config.py +++ b/tests/TestSuite_dynamic_config.py @@ -72,16 +72,12 @@ class TestDynamicConfig(TestCase): self.verify(len(self.dut_ports) >= 2, "Insufficient ports") # Prepare cores and ports - cores = self.dut.get_core_list('1S/2C/2T') - self.coreMask = utils.create_mask(cores) self.portMask = utils.create_mask(self.dut_ports[:2]) self.path=self.dut.apps_name['test-pmd'] # launch app - cmd = "%s -c %s -n 3 -- -i --rxpt=0 \ - --rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s" % (self.path, self.coreMask, self.portMask) - - self.dut.send_expect("%s" % cmd, "testpmd> ", 120) - + self.eal_para = self.dut.create_eal_parameters(cores="1S/2C/2T") + self.dut.send_expect(r'%s %s -- -i --rxpt=0 --rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s' + % (self.path, self.eal_para, self.portMask), "testpmd>", 120) # get dest address from self.target port out = self.dut.send_expect( "show port info %d" % self.dut_ports[0], "testpmd> ") @@ -118,10 +114,9 @@ class TestDynamicConfig(TestCase): """ Run before each test case. """ - cmd = "%s -n 3 -- -i --rxpt=0 \ - --rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s" % (self.path, self.portMask) - - self.dut.send_expect("%s" % cmd, "testpmd> ", 120) + self.eal_para = self.dut.create_eal_parameters('1S/2C/2T') + self.dut.send_expect(r'%s %s -- -i --rxpt=0 --rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s' + % (self.path, self.eal_para, self.portMask), "testpmd>", 120) time.sleep(5) self.dut.send_expect("start", "testpmd> ", 120) -- 2.17.1