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 1CFDEA0524; Tue, 25 Feb 2020 10:27:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 10C441BFD2; Tue, 25 Feb 2020 10:27:08 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C5F281BFD1 for ; Tue, 25 Feb 2020 10:27:06 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 01:27:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,483,1574150400"; d="scan'208";a="350113250" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 25 Feb 2020 01:27:04 -0800 From: "zhu,shuai" To: dts@dpdk.org Cc: yinan.wang@intel.com, "zhu,shuai" Date: Tue, 25 Feb 2020 17:32:28 +0800 Message-Id: <1582623151-18473-3-git-send-email-shuaix.zhu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1582623151-18473-1-git-send-email-shuaix.zhu@intel.com> References: <1582623151-18473-1-git-send-email-shuaix.zhu@intel.com> Subject: [dts] [PATCH V1] tests/virtio_user_as_exceptional_path:add create_eal_parameters function. 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: zhu,shuai --- ...stSuite_virtio_user_as_exceptional_path.py | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/TestSuite_virtio_user_as_exceptional_path.py b/tests/TestSuite_virtio_user_as_exceptional_path.py index 3605900..9759c7f 100644 --- a/tests/TestSuite_virtio_user_as_exceptional_path.py +++ b/tests/TestSuite_virtio_user_as_exceptional_path.py @@ -48,7 +48,6 @@ class TestVirtioUserAsExceptionalPath(TestCase): # Get and verify the ports self.dut_ports = self.dut.get_ports() self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing") - self.memory_channel = self.dut.get_memory_channels() self.pci0 = self.dut.ports_info[0]['pci'] pf_info = self.dut_ports[0] netdev = self.dut.ports_info[pf_info]['port'] @@ -112,12 +111,12 @@ class TestVirtioUserAsExceptionalPath(TestCase): cores_config = '1S/%sC/1T' % cores_number cores_list = self.dut.get_core_list(cores_config, socket=self.socket) self.verify(len(cores_list) >= cores_number, "Failed to get cores list") - core_mask = utils.create_mask(cores_list[0:2]) - self.testcmd = self.target + "/app/testpmd -c %s -n %d -w %s --socket-mem %s" \ - + " --vdev=virtio_user0,mac=%s,path=/dev/vhost-net,"\ - "queue_size=1024,queues=%s -- -i --rxd=1024 --txd=1024 %s" - self.testcmd_start = self.testcmd % (core_mask, self.memory_channel, - self.pci0, self.socket_mem, self.virtio_mac, self.queue, comment) + core_mask = cores_list[0:2] + testcmd = self.target + "/app/testpmd " + vdev = [r"--vdev=virtio_user0,mac=%s,path=/dev/vhost-net," % self.virtio_mac] + eal_params = self.dut.create_eal_parameters(cores=core_mask, ports=[self.pci0], vdevs=vdev) + para = " queue_size=1024,queues=%s -- -i --rxd=1024 --txd=1024 %s" % (self.queue, comment) + self.testcmd_start = testcmd + eal_params + para self.vhost_user = self.dut.new_session(suite="user") self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120) self.vhost_user.send_expect("start", "testpmd>", 120) @@ -128,12 +127,11 @@ class TestVirtioUserAsExceptionalPath(TestCase): self.dut.send_expect("taskset -pc %s %s" % (cores_list[-2], vhost_pid_list[2]), "# ") def launch_testpmd_exception_path(self): - self.testcmd = self.target + "/app/testpmd -c %s -n %d --socket-mem %s --legacy-mem" \ - + " --vdev=virtio_user0,mac=%s,path=/dev/vhost-net,queue_size=1024 -- -i" \ - + " --rxd=1024 --txd=1024" - self.coremask = utils.create_mask(self.cores) - self.testcmd_start = self.testcmd % (self.coremask, self.memory_channel, - self.socket_mem, self.virtio_mac) + testcmd = self.target + "/app/testpmd " + vdev = [r"--vdev=virtio_user0,mac=%s,path=/dev/vhost-net,queue_size=1024" % self.virtio_mac] + eal_params = self.dut.create_eal_parameters(cores=self.cores, ports=[self.pci0], vdevs=vdev) + para = " -- -i --rxd=1024 --txd=1024" + self.testcmd_start = testcmd + eal_params + para self.vhost_user = self.dut.new_session(suite="user") self.vhost_user.send_expect("modprobe vhost-net", "#", 120) self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120) -- 2.17.2