From patchwork Mon Sep 26 09:27:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 116864 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 81E5AA00C2; Mon, 26 Sep 2022 11:35:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B28F4069B; Mon, 26 Sep 2022 11:35:29 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 9F85A400D7 for ; Mon, 26 Sep 2022 11:35:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664184927; x=1695720927; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Atmix1DaAK91OJE9l/4YJxoN6XRe5PN2hzvpNUiL2bs=; b=cBCB4MpJAkUE1vXY43Y3en2ruXTe/FjgCiWPqOMz7Q6DLNvVnnLZy7ao 7/ycvaRXmoVUXGQwlHUaxIFfteDMpgPiWrNUfq/YsDYcPPj29Xzle3twp kpL8x2jLvdanoGvuNsB9rhIyZpHWoDpe2EIZFWf2h6xrK003+l3yWFfxQ obesz+MdFeD+CJ/lYA2kih6d90VdzTqteDBJkXgIKJqPLgkWQYIUob6CB uAkClhBuHVC69qExyIL6+8OM+367eXGEnMUgDj+EoPoti0sasOkmipX9r 34FnLOtrkZkN0kElGWI5QmgN6SkKm/jF2m2E0nd8ZdPlcjfsHgY/nBGw5 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10481"; a="299707561" X-IronPort-AV: E=Sophos;i="5.93,345,1654585200"; d="scan'208";a="299707561" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2022 02:35:26 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10481"; a="689489527" X-IronPort-AV: E=Sophos;i="5.93,345,1654585200"; d="scan'208";a="689489527" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2022 02:35:25 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1] tests/virtio_user_as_exceptional_path: modify testsuite syncwith testplan Date: Mon, 26 Sep 2022 05:27:42 -0400 Message-Id: <20220926092742.129203-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 1.Combin testcase1 and testcase1 into one case sync with testplan. 2.Delete the redundant steps and add the steps sync with testplan. Signed-off-by: Wei Ling --- ...stSuite_virtio_user_as_exceptional_path.py | 33 +++++-------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/tests/TestSuite_virtio_user_as_exceptional_path.py b/tests/TestSuite_virtio_user_as_exceptional_path.py index c5105d5f..509d63f3 100644 --- a/tests/TestSuite_virtio_user_as_exceptional_path.py +++ b/tests/TestSuite_virtio_user_as_exceptional_path.py @@ -139,10 +139,11 @@ class TestVirtioUserAsExceptionalPath(TestCase): self.vhost_user.send_expect( "port config 0 tx_offload ipv4_cksum on", "testpmd> ", 120 ) + self.vhost_user.send_expect("csum set tcp hw 0", "testpmd> ", 120) + self.vhost_user.send_expect("csum set ip hw 0", "testpmd> ", 120) self.vhost_user.send_expect("csum set ip sw 1", "testpmd> ", 120) self.vhost_user.send_expect("csum set tcp hw 1", "testpmd> ", 120) - self.vhost_user.send_expect("csum set ip hw 0", "testpmd> ", 120) - self.vhost_user.send_expect("csum set tcp hw 0", "testpmd> ", 120) + self.vhost_user.send_expect("set port 0 gso on", "testpmd> ", 120) self.vhost_user.send_expect("tso set 1448 0", "testpmd> ", 120) self.vhost_user.send_expect("port start 0", "testpmd> ", 120) self.vhost_user.send_expect("port start 1", "testpmd> ", 120) @@ -173,12 +174,6 @@ class TestVirtioUserAsExceptionalPath(TestCase): self.dut.send_expect( "ip netns exec ns1 ifconfig %s 1.1.1.8 up" % self.nic_in_kernel, "#" ) - self.dut.send_expect( - "ip netns exec ns1 ethtool -K %s gro on" % self.nic_in_kernel, "#" - ) - self.dut.send_expect( - "ip netns exec ns1 ethtool -K %s tso on" % self.nic_in_kernel, "#" - ) def iperf_result_verify(self, vm_client, direction): """ @@ -258,11 +253,13 @@ class TestVirtioUserAsExceptionalPath(TestCase): rate_value > 0, "The received package did not reach the expected value" ) - def test_vhost_exception_path_TAP_original(self): + def test_vhost_exception_path_with_virtio_user(self): + """ + Test Case1:test exceptional path with virtio_user + """ self.get_pci_info_from_cfg() self.config_kernel_nic_host() self.launch_testpmd_exception_path() - self.dut.get_session_output(timeout=2) time.sleep(5) # Get the virtio-net device name self.prepare_tap_device() @@ -278,21 +275,7 @@ class TestVirtioUserAsExceptionalPath(TestCase): self.iperf_result_verify(self.iperf, "direction_TAP_original") self.logger.info("TAP->virtio-user->Kernel_NIC %s " % (self.output_result)) self.iperf.send_expect("rm /root/iperf_client.log", "#", 10) - self.vhost_user.send_expect("quit", "#", 120) - self.dut.close_session(self.vhost_user) - self.dut.send_expect("ip netns del ns1", "#") - self.dut.close_session(self.iperf) - def test_vhost_exception_path_NIC_original(self): - self.get_pci_info_from_cfg() - self.config_kernel_nic_host() - self.launch_testpmd_exception_path() - time.sleep(5) - self.dut.get_session_output(timeout=2) - self.prepare_tap_device() - self.testpmd_reset() - self.iperf = self.dut.new_session(suite="iperf") - self.dut.send_expect("rm /root/iperf_client.log", "#", 10) self.iperf.send_expect("iperf -s -i 1", "", 180) self.dut.send_expect( "ip netns exec ns1 iperf -c 1.1.1.2 -i 1 -t 10 > /root/iperf_client.log &", @@ -302,9 +285,9 @@ class TestVirtioUserAsExceptionalPath(TestCase): time.sleep(30) self.iperf.send_expect("^C", "#", 10) self.iperf_result_verify(self.dut, "direction_NIC_original") - self.dut.get_session_output(timeout=2) self.logger.info("Kernel_NIC<-virtio-user<-TAP %s " % (self.output_result)) self.dut.send_expect("rm /root/iperf_client.log", "#", 10) + self.vhost_user.send_expect("quit", "#", 120) self.dut.close_session(self.vhost_user) self.dut.send_expect("ip netns del ns1", "#")