test suite reviews and discussions
 help / color / mirror / Atom feed
From: "zhu,shuai" <shuaix.zhu@intel.com>
To: dts@dpdk.org
Cc: yinan.wang@intel.com, "zhu,shuai" <shuaix.zhu@intel.com>
Subject: [dts] [PATCH V1] tests/virtio_user_as_exceptional_path:add create_eal_parameters function.
Date: Tue, 25 Feb 2020 17:32:28 +0800	[thread overview]
Message-ID: <1582623151-18473-3-git-send-email-shuaix.zhu@intel.com> (raw)
In-Reply-To: <1582623151-18473-1-git-send-email-shuaix.zhu@intel.com>



Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
 ...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


  parent reply	other threads:[~2020-02-25  9:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  9:32 [dts] [PATCH V1] tests/vdev_primary_secondary:add " zhu,shuai
2020-02-25  9:32 ` [dts] [PATCH V1] tests/virtio_event_idx_interrupt:add " zhu,shuai
2020-02-27  9:50   ` Zhu, ShuaiX
2020-03-03  5:24   ` Tu, Lijuan
2020-02-25  9:32 ` zhu,shuai [this message]
2020-02-25  9:32 ` [dts] [PATCH V1] tests/vm2vm_virtio_net_perf:add " zhu,shuai
2020-02-27  9:49   ` Zhu, ShuaiX
2020-03-03  5:24   ` Tu, Lijuan
2020-02-25  9:32 ` [dts] [PATCH V1] tests/vm2vm_virtio_pmd:add " zhu,shuai
2020-02-25  9:32 ` [dts] [PATCH V1] tests/vm2vm_virtio_user:add " zhu,shuai
2020-02-27  9:49 ` [dts] [PATCH V1] tests/vdev_primary_secondary:add " Zhu, ShuaiX
2020-03-03  5:24 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1582623151-18473-3-git-send-email-shuaix.zhu@intel.com \
    --to=shuaix.zhu@intel.com \
    --cc=dts@dpdk.org \
    --cc=yinan.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).