test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1 2/2] tests/pvp_share_lib: optimize code and delete repeat code
@ 2022-04-18 10:29 Wei Ling
  0 siblings, 0 replies; only message in thread
From: Wei Ling @ 2022-04-18 10:29 UTC (permalink / raw)
  To: dts; +Cc: Wei Ling

Optimize code and delete repeat code.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_pvp_share_lib.py | 29 ++++++-----------------------
 1 file changed, 6 insertions(+), 23 deletions(-)

diff --git a/tests/TestSuite_pvp_share_lib.py b/tests/TestSuite_pvp_share_lib.py
index f9c1f5da..f5377549 100644
--- a/tests/TestSuite_pvp_share_lib.py
+++ b/tests/TestSuite_pvp_share_lib.py
@@ -36,7 +36,7 @@ The feature need compile dpdk as shared libraries.
 
 import framework.utils as utils
 from framework.pktgen import PacketGeneratorHelper
-from framework.settings import HEADER_SIZE
+from framework.settings import HEADER_SIZE, DRIVERS
 from framework.test_case import TestCase
 
 
@@ -157,7 +157,7 @@ class TestPVPShareLib(TestCase):
             ports=[self.pci_info],
         )
         eal_param += (
-            " -d librte_net_vhost.so -d librte_net_%s.so -d librte_mempool_ring.so --file-prefix=vhost"
+            "-d librte_net_vhost.so -d librte_net_%s.so -d librte_mempool_ring.so --file-prefix=vhost"
             % driver
         )
         command_line_client = self.path + eal_param + " -- -i"
@@ -179,7 +179,7 @@ class TestPVPShareLib(TestCase):
         )
         if self.check_2M_env:
             eal_param += " --single-file-segments"
-        eal_param += " -d librte_net_virtio.so -d librte_mempool_ring.so"
+        eal_param += "-d librte_net_virtio.so -d librte_mempool_ring.so"
         command_line_user = self.path + eal_param + " -- -i"
         self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
         self.virtio_user.send_expect("start", "testpmd> ", 120)
@@ -193,29 +193,12 @@ class TestPVPShareLib(TestCase):
         self.dut.close_session(self.vhost_user)
         self.dut.close_session(self.virtio_user)
 
-    def test_perf_pvp_share_lib_of_niantic(self):
-        """
-        Vhost/virtio-user pvp share lib test with niantic
-        """
-        self.verify(
-            self.nic in ["niantic"],
-            "the nic not support this case: %s" % self.running_case,
-        )
-        self.start_testpmd_as_vhost(driver="ixgbe")
-        self.start_testpmd_as_virtio()
-        self.send_and_verify()
-        self.result_table_print()
-        self.close_all_apps()
-
-    def test_perf_pvp_share_lib_of_fortville(self):
-        """
-        Vhost/virtio-user pvp share lib test with fortville
-        """
+    def test_perf_pvp_share_lib(self):
         self.verify(
-            self.nic in ["fortville_eagle", "fortville_spirit", "fortville_25g"],
+            self.nic in ["niantic", "fortville_eagle", "fortville_spirit", "fortville_25g"],
             "the nic not support this case: %s" % self.running_case,
         )
-        self.start_testpmd_as_vhost(driver="i40e")
+        self.start_testpmd_as_vhost(driver=DRIVERS[self.nic])
         self.start_testpmd_as_virtio()
         self.send_and_verify()
         self.result_table_print()
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-18 10:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 10:29 [dts][PATCH V1 2/2] tests/pvp_share_lib: optimize code and delete repeat code Wei Ling

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).