From patchwork Tue Feb 2 14:07:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 87609 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E891A052A; Tue, 2 Feb 2021 07:14:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 50527240250; Tue, 2 Feb 2021 07:14:41 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 81F80240243 for ; Tue, 2 Feb 2021 07:14:39 +0100 (CET) IronPort-SDR: K076jmMAuTIsc6deJtIIQEvlEYI2jiaXjqYe1dhlSfgMAPUklhOncf+6AGJN/ZFVphTjZUJrSB YSLZ2jRQ7hgw== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="160569652" X-IronPort-AV: E=Sophos;i="5.79,394,1602572400"; d="scan'208";a="160569652" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 22:14:38 -0800 IronPort-SDR: /56RrkotzYFEut+fK8ipy+wnrHS7r+jY9KuWRMUzp63t8f8PZzPTRSYDLy6ei8VsQFwTy5HIEe 4rG4JR3F/tWw== X-IronPort-AV: E=Sophos;i="5.79,394,1602572400"; d="scan'208";a="370375811" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2021 22:14:37 -0800 From: Ling Wei To: dts@dpdk.org Cc: Ling Wei Date: Tue, 2 Feb 2021 14:07:53 +0000 Message-Id: <20210202140754.3877409-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V3] tests/loopback_virtio_user_server_mode:modify execute virtio-user server side testpmd command after client side started X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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" 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. v3:Fix patch comments about dpdk commit description error. Signed-off-by: Ling Wei --- 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()