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/vm2vm_virtio_pmd:add create_eal_parameters function.
Date: Tue, 25 Feb 2020 17:32:30 +0800	[thread overview]
Message-ID: <1582623151-18473-5-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>
---
 tests/TestSuite_vm2vm_virtio_pmd.py | 44 +++++++++++++----------------
 1 file changed, 20 insertions(+), 24 deletions(-)

diff --git a/tests/TestSuite_vm2vm_virtio_pmd.py b/tests/TestSuite_vm2vm_virtio_pmd.py
index c1703b9..f307391 100644
--- a/tests/TestSuite_vm2vm_virtio_pmd.py
+++ b/tests/TestSuite_vm2vm_virtio_pmd.py
@@ -60,6 +60,7 @@ class TestVM2VMVirtioPMD(TestCase):
         self.virtio_user1 = None
         self.flag_compiled = False
         self.backup_speed = self.dut.skip_setup
+        self.pci_info = self.dut.ports_info[0]['pci']
 
     def set_up(self):
         """
@@ -102,16 +103,13 @@ class TestVM2VMVirtioPMD(TestCase):
         """
         launch the testpmd on vhost side
         """
-        vhost_mask = utils.create_mask(self.cores_list[0:2])
-        self.command_line = self.dut.target + "/app/testpmd -c %s -n %d " + \
-            "--socket-mem %s --legacy-mem --no-pci --file-prefix=vhost " + \
-            "--vdev 'net_vhost0,iface=%s/vhost-net0,queues=1' " + \
-            "--vdev 'net_vhost1,iface=%s/vhost-net1,queues=1' " + \
-            "-- -i --nb-cores=1 --txd=1024 --rxd=1024"
-
-        self.command_line = self.command_line % (
-                            vhost_mask, self.memory_channel, self.socket_mem,
-                            self.base_dir, self.base_dir)
+        vhost_mask = self.cores_list[0:2]
+        testcmd = self.dut.target + "/app/testpmd "
+        vdev1 = "--vdev 'net_vhost0,iface=%s/vhost-net0,queues=1' "
+        vdev2 = "--vdev 'net_vhost1,iface=%s/vhost-net1,queues=1' "
+        eal_params = self.dut.create_eal_parameters(cores=vhost_mask, no_pci=True, prefix='vhost', ports=[self.pci_info])
+        para = " -- -i --nb-cores=1 --txd=1024 --rxd=1024"
+        self.command_line = testcmd + eal_params + vdev1 + vdev2 + para
         self.vhost_user.send_expect(self.command_line, "testpmd> ", 30)
         self.vhost_user.send_expect("set fwd mac", "testpmd> ", 30)
         self.vhost_user.send_expect("start", "testpmd> ", 30)
@@ -121,13 +119,12 @@ class TestVM2VMVirtioPMD(TestCase):
         launch the testpmd as virtio with vhost_net1
         """
         self.virtio_user1 = self.dut.new_session(suite="virtio_user1")
-        virtio_mask = utils.create_mask(self.cores_list[2:4])
-        command_line = self.dut.target + "/app/testpmd -c %s -n %d " + \
-            "--socket-mem %s --no-pci --file-prefix=virtio " + \
-            "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=1,%s " + \
-            "-- -i --nb-cores=1 --txd=1024 --rxd=1024 %s"
-        command_line = command_line % (virtio_mask, self.memory_channel,
-                    self.socket_mem, path_mode, extern_param)
+        virtio_mask = self.cores_list[2:4]
+        testcmd = self.dut.target + "/app/testpmd "
+        vdev = [r"--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=1,%s " % path_mode]
+        eal_params = self.dut.create_eal_parameters(cores=virtio_mask, no_pci=True, prefix='virtio', ports=[self.pci_info], vdevs=vdev)
+        para = " -- -i --nb-cores=1 --txd=1024 --rxd=1024 %s" % extern_param
+        command_line = testcmd + eal_params + para
         self.virtio_user1.send_expect(command_line, 'testpmd> ', 30)
         self.virtio_user1.send_expect('set fwd rxonly', 'testpmd> ', 30)
         self.virtio_user1.send_expect('start', 'testpmd> ', 30)
@@ -137,13 +134,12 @@ class TestVM2VMVirtioPMD(TestCase):
         launch the testpmd as virtio with vhost_net0
         """
         self.virtio_user0 = self.dut.new_session(suite="virtio_user0")
-        virtio_mask = utils.create_mask(self.cores_list[4:6])
-        command_line = self.dut.target + "/app/testpmd -c %s -n %d " + \
-            "--socket-mem %s --no-pci --file-prefix=virtio0 " + \
-            "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=1,%s " + \
-            "-- -i --nb-cores=1 --txd=1024 --rxd=1024 %s"
-        command_line = command_line % (virtio_mask, self.memory_channel,
-                    self.socket_mem, path_mode, extern_param)
+        virtio_mask = self.cores_list[4:6]
+        testcmd = self.dut.target + "/app/testpmd "
+        vdev = [r"--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=1,%s " % path_mode]
+        eal_params = self.dut.create_eal_parameters(cores=virtio_mask, no_pci=True, prefix='virtio0', ports=[self.pci_info], vdevs=vdev)
+        para = " -- -i --nb-cores=1 --txd=1024 --rxd=1024 %s" % extern_param
+        command_line = testcmd + eal_params + para
         self.virtio_user0.send_expect(command_line, 'testpmd> ', 30)
         self.virtio_user0.send_expect('set txpkts 2000,2000,2000,2000', 'testpmd> ', 30)
         self.virtio_user0.send_expect('set burst 1', 'testpmd> ', 30)
-- 
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 ` [dts] [PATCH V1] tests/virtio_user_as_exceptional_path:add " zhu,shuai
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 ` zhu,shuai [this message]
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-5-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).