test suite reviews and discussions
 help / color / mirror / Atom feed
From: Ling Wei <weix.ling@intel.com>
To: dts@dpdk.org
Cc: Ling Wei <weix.ling@intel.com>
Subject: [dts] [PATCH V2] tests/loopback_virtio_user_server_mode:modify execute virtio-user server side testpmd command after client side started
Date: Tue,  2 Feb 2021 13:56:36 +0000	[thread overview]
Message-ID: <20210202135636.3877280-1-weix.ling@intel.com> (raw)

v1:
According to DPDK 'commit 9af79db20f4c(make server mode blocking),
when launch virtio-user testpmd as server mode, virtio-user server
side testpmd expected character will be 'wait for client side
started...', after client side started, it change to 'testpmd>',
so dts need modify execute virtio-user server side testpmd command
after client side started.

v2:
Fix patch comments about dpdk commit description error.

Signed-off-by: Ling Wei <weix.ling@intel.com>
---
 tests/TestSuite_loopback_virtio_user_server_mode.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_loopback_virtio_user_server_mode.py b/tests/TestSuite_loopback_virtio_user_server_mode.py
index 9801175e..0178ca34 100644
--- a/tests/TestSuite_loopback_virtio_user_server_mode.py
+++ b/tests/TestSuite_loopback_virtio_user_server_mode.py
@@ -92,7 +92,7 @@ class TestLoopbackVirtioUserServerMode(TestCase):
         out = self.dut.send_expect("cat /proc/meminfo |grep Hugepagesize|awk '{print($2)}'", "# ")
         return True if out == '2048' else False
 
-    def lanuch_virtio_user_testpmd(self, args):
+    def lanuch_virtio_user_testpmd(self, args, set_fwd_mac=True, expected='testpmd> '):
         """
         start testpmd of vhost user
         """
@@ -103,8 +103,9 @@ class TestLoopbackVirtioUserServerMode(TestCase):
             eal_param += " --force-max-simd-bitwidth=512"
         param = "--rxq=1 --txq=1 --no-numa"
         self.virtio_user_pmd.start_testpmd(cores=self.core_list_user, param=param, eal_param=eal_param, \
-                no_pci=True, ports=[], prefix="virtio", fixed_prefix=True)
-        self.virtio_user_pmd.execute_cmd("set fwd mac", "testpmd> ", 120)
+                no_pci=True, ports=[], prefix="virtio", fixed_prefix=True, expected=expected)
+        if set_fwd_mac:
+            self.virtio_user_pmd.execute_cmd("set fwd mac", "testpmd> ", 120)
 
     def lanuch_vhost_testpmd_with_multi_queue(self, extern_params=""):
         """
@@ -251,8 +252,9 @@ class TestLoopbackVirtioUserServerMode(TestCase):
         self.nb_cores = 1
         virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=1",
                           "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
-        self.lanuch_virtio_user_testpmd(virtio_pmd_arg)
+        self.lanuch_virtio_user_testpmd(virtio_pmd_arg, set_fwd_mac=False, expected='waiting for client connection...')
         self.lanuch_vhost_testpmd()
+        self.virtio_user_pmd.execute_cmd("set fwd mac", "testpmd> ", 120)
         self.start_to_send_packets(self.virtio_user, self.vhost)
         self.calculate_avg_throughput("lanuch virtio first", "")
         self.result_table_print()
@@ -266,8 +268,9 @@ class TestLoopbackVirtioUserServerMode(TestCase):
         self.nb_cores = 1
         virtio_pmd_arg = {"version": "packed_vq=1,in_order=0,mrg_rxbuf=1",
                           "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"}
-        self.lanuch_virtio_user_testpmd(virtio_pmd_arg)
+        self.lanuch_virtio_user_testpmd(virtio_pmd_arg, set_fwd_mac=False, expected='waiting for client connection...')
         self.lanuch_vhost_testpmd()
+        self.virtio_user_pmd.execute_cmd("set fwd mac", "testpmd> ", 120)
         self.start_to_send_packets(self.virtio_user, self.vhost)
         self.calculate_avg_throughput("lanuch virtio first", "")
         self.result_table_print()
-- 
2.25.1


                 reply	other threads:[~2021-02-02  6:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210202135636.3877280-1-weix.ling@intel.com \
    --to=weix.ling@intel.com \
    --cc=dts@dpdk.org \
    /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).