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 C93A8A09E5; Tue, 8 Dec 2020 11:04:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CBC6DC9E7; Tue, 8 Dec 2020 11:04:12 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B6532C9E6 for ; Tue, 8 Dec 2020 11:04:10 +0100 (CET) IronPort-SDR: VdvQrqhcCsx62ioSjB3vnZv6IZWN55C3r6fG/fcx6mYMlal3WrSkriDNjQvmS9n8w/sJ+0LwOM SIC2/Nu7DZ0w== X-IronPort-AV: E=McAfee;i="6000,8403,9828"; a="171293448" X-IronPort-AV: E=Sophos;i="5.78,402,1599548400"; d="scan'208";a="171293448" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2020 02:04:10 -0800 IronPort-SDR: KDWLSe7Oj2u273Czo0pB/ZCWb8jGlHOnWPt0Un4vhxM1pxMc4tofPSdyXSGopnFbypy1dM7BUs H3zMLNcXGYzQ== X-IronPort-AV: E=Sophos;i="5.78,402,1599548400"; d="scan'208";a="363575980" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2020 02:04:09 -0800 From: Zhou Jun To: dts@dpdk.org Cc: Zhou Jun Date: Tue, 8 Dec 2020 18:06:24 +0800 Message-Id: <20201208100627.9792-26-junx.w.zhou@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201208100627.9792-1-junx.w.zhou@intel.com> References: <20201208100627.9792-1-junx.w.zhou@intel.com> Subject: [dts] [dts 25/28] tests/TestSuite_softnic:Modify the hard coded app parameter to call the platform interface 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: Zhou Jun --- tests/TestSuite_softnic.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_softnic.py b/tests/TestSuite_softnic.py index d0fb419c..0795b45c 100644 --- a/tests/TestSuite_softnic.py +++ b/tests/TestSuite_softnic.py @@ -77,7 +77,7 @@ class TestSoftnic(TestCase): self.dut.session.copy_file_to(self.nat_firmware, self.root_path) self.eal_param = " -w %s" % self.dut.ports_info[0]['pci'] self.path = self.dut.apps_name['test-pmd'] - self.cmd = "./%s -c 0x7 -s 0x4 -n 4 %s --vdev 'net_softnic0,firmware=/tmp/%s,cpu_id=1,conn_port=8086' -- -i --forward-mode=softnic --portmask=0x2" + self.pmdout = PmdOutput(self.dut) # get dts output path if self.logger.log_path.startswith(os.sep): self.output_path = self.logger.log_path @@ -103,7 +103,9 @@ class TestSoftnic(TestCase): # 10G nic pps(M) expect_pps = [14, 8, 4, 2, 1, 0.9, 0.8] - self.dut.send_expect(self.cmd % (self.path, self.eal_param, 'firmware.cli'), "testpmd>", timeout=800) + self.pmdout.start_testpmd(list(range(3)), "--forward-mode=softnic --portmask=0x2", + eal_param="-s 0x4 %s --vdev 'net_softnic0,firmware=/tmp/%s,cpu_id=1,conn_port=8086'" + % (self.eal_param, 'firmware.cli')) self.dut.send_expect("start", "testpmd>") rx_port = self.tester.get_local_port(0) tx_port = self.tester.get_local_port(0) @@ -128,7 +130,9 @@ class TestSoftnic(TestCase): def test_perf_shaping_for_pipe(self): self.change_config_file('tm_firmware.cli') - self.dut.send_expect(self.cmd % (self.path, self.eal_param, 'tm_firmware.cli'), "testpmd> ", timeout=800) + self.pmdout.start_testpmd(list(range(3)), "--forward-mode=softnic --portmask=0x2", + eal_param="-s 0x4 %s --vdev 'net_softnic0,firmware=/tmp/%s,cpu_id=1,conn_port=8086'" + % (self.eal_param, 'tm_firmware.cli')) self.dut.send_expect("start", "testpmd>") rx_port = self.tester.get_local_port(0) pkts = ["Ether(dst='%s')/IP(dst='100.0.0.0')/UDP()/Raw(load='x'*(64 - %s))", "Ether(dst='%s')/IP(dst='100.0.15.255')/UDP()/Raw(load='x'*(64 - %s))", "Ether(dst='%s')/IP(dst='100.0.4.0')/UDP()/Raw(load='x'*(64 - %s))"] @@ -167,7 +171,9 @@ class TestSoftnic(TestCase): for t in pkt_type: for i in range(2): self.dut.send_expect("sed -i -e '12c table action profile AP0 ipv4 offset 270 fwd nat %s proto %s' %s" % (pkt_location[i], t, self.root_path + 'nat_firmware.cli'), "#") - self.dut.send_expect(self.cmd % (self.path, self.eal_param, 'nat_firmware.cli'), "testpmd>", timeout=60) + self.pmdout.start_testpmd(list(range(3)), "--forward-mode=softnic --portmask=0x2", + eal_param="-s 0x4 %s --vdev 'net_softnic0,firmware=/tmp/%s,cpu_id=1,conn_port=8086'" % ( + self.eal_param, 'nat_firmware.cli')) self.dut.send_expect("start", "testpmd>") # src ip tcp for j in range(2): -- 2.17.1