From: Wei Ling <weix.ling@intel.com>
To: dts@dpdk.org
Cc: Wei Ling <weix.ling@intel.com>
Subject: [dts][PATCH V1] tests/pvp_share_lib: delete repeat code
Date: Wed, 21 Sep 2022 22:58:43 -0400 [thread overview]
Message-ID: <20220922025843.1862827-1-weix.ling@intel.com> (raw)
Optimize code and delete repeat code.
Signed-off-by: Wei Ling <weix.ling@intel.com>
---
tests/TestSuite_pvp_share_lib.py | 30 ++++++++----------------------
1 file changed, 8 insertions(+), 22 deletions(-)
diff --git a/tests/TestSuite_pvp_share_lib.py b/tests/TestSuite_pvp_share_lib.py
index ee3ae39a..32879503 100644
--- a/tests/TestSuite_pvp_share_lib.py
+++ b/tests/TestSuite_pvp_share_lib.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019 Intel Corporation
#
@@ -7,9 +8,8 @@ DPDK Test suite.
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
@@ -130,7 +130,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"
@@ -152,7 +152,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)
@@ -166,29 +166,15 @@ 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):
+ def test_perf_pvp_share_lib(self):
"""
- Vhost/virtio-user pvp share lib test with 82599
+ Vhost/virtio-user pvp share lib test with Intel® Ethernet 82599/700 Series
"""
self.verify(
- self.nic in ["IXGBE_10G-82599_SFP"],
+ self.nic in ["IXGBE_10G-82599_SFP", "I40E_10G-SFP_XL710", "I40E_40G-QSFP_A", "I40E_25G-25G_SFP28"],
"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 Intel® Ethernet 700 Series
- """
- self.verify(
- self.nic in ["I40E_10G-SFP_XL710", "I40E_40G-QSFP_A", "I40E_25G-25G_SFP28"],
- "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
reply other threads:[~2022-09-22 3:05 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=20220922025843.1862827-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).