[V1] tests/virtio_user_as_exceptional_path: modify testsuite syncwith testplan

Message ID 20220926092742.129203-1-weix.ling@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/virtio_user_as_exceptional_path: modify testsuite syncwith testplan |

Checks

Context Check Description
ci/Intel-dts-format-test success Testing OK
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-suite-test fail Testing issues

Commit Message

Ling, WeiX Sept. 26, 2022, 9:27 a.m. UTC
  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 <weix.ling@intel.com>
---
 ...stSuite_virtio_user_as_exceptional_path.py | 33 +++++--------------
 1 file changed, 8 insertions(+), 25 deletions(-)
  

Patch

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", "#")