test suite reviews and discussions
 help / color / mirror / Atom feed
From: Ling Wei <weix.ling@intel.com>
To: dts@dpdk.org
Cc: Ling Wei <weix.ling@intel.com>
Subject: [dts] [PATCH V1 9/9] tests/vswitch_sample_cbdma:modify hard code bind cbdma device to igb_uio by drivername in execution.cfg
Date: Fri, 19 Mar 2021 14:47:13 +0800	[thread overview]
Message-ID: <20210319064713.4894-1-weix.ling@intel.com> (raw)

1.Modify hard code bind cbdma device to igb_uio by drivername
 in execution.cfg.
2.Adjust code format.

Signed-off-by: Ling Wei <weix.ling@intel.com>
---
 tests/TestSuite_vswitch_sample_cbdma.py | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/tests/TestSuite_vswitch_sample_cbdma.py b/tests/TestSuite_vswitch_sample_cbdma.py
index b067cc09..df3ab6f3 100644
--- a/tests/TestSuite_vswitch_sample_cbdma.py
+++ b/tests/TestSuite_vswitch_sample_cbdma.py
@@ -228,6 +228,9 @@ class TestVswitchSampleCBDMA(TestCase):
         """
         get all cbdma ports
         """
+        # check driver name in execution.cfg
+        self.verify(self.drivername == 'igb_uio',
+                    "CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg")
         str_info = 'Misc (rawdev) devices using kernel driver'
         out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)
         device_info = out.split('\n')
@@ -252,8 +255,7 @@ class TestVswitchSampleCBDMA(TestCase):
             dmas_info += dmas
         self.dmas_info = dmas_info[:-1]
         self.device_str = ' '.join(used_cbdma)
-        self.dut.setup_modules(self.target, "igb_uio","None")
-        self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=%s %s' % ("igb_uio", self.device_str), '# ', 60)
+        self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=%s %s' % (self.drivername, self.device_str), '# ', 60)
 
     def send_vlan_packet(self, dts_mac, pkt_size=64, pkt_count=1):
         """
@@ -338,7 +340,6 @@ class TestVswitchSampleCBDMA(TestCase):
         self.set_async_threshold(1518)
         self.build_vhost_app()
         cbmda_copy = self.pvp_test_with_cbdma(socket_num=1, with_cbdma=True, cbdma_num=1)
-
         self.virtio_user0_pmd.execute_cmd("quit", "#")
         self.vhost_user.send_expect("^C", "# ", 20)
 
@@ -348,14 +349,12 @@ class TestVswitchSampleCBDMA(TestCase):
         self.set_async_threshold(0)
         self.build_vhost_app()
         sync_copy = self.pvp_test_with_cbdma(socket_num=1, with_cbdma=True, cbdma_num=1)
-
         self.virtio_user0_pmd.execute_cmd("quit", "#")
         self.vhost_user.send_expect("^C", "# ", 20)
 
         # test CPU copy
         # CPU copy means vhost enqueue w/o cbdma channel
         cpu_copy = self.pvp_test_with_cbdma(socket_num=1, with_cbdma=False, cbdma_num=0)
-
         self.virtio_user0_pmd.execute_cmd("quit", "#")
         self.vhost_user.send_expect("^C", "# ", 20)
 
@@ -414,7 +413,6 @@ class TestVswitchSampleCBDMA(TestCase):
 
         self.logger.info("Relaunch vhost app perf test")
         after_relunch = self.pvp_test_with_multi_cbdma(socket_num=2, with_cbdma=True, cbdma_num=2, launch_virtio=False, quit_vhost=False)
-
         self.virtio_user0_pmd.execute_cmd("quit", "#")
         self.virtio_user1_pmd.execute_cmd("quit", "#")
         self.vhost_user.send_expect("^C", "# ", 20)
@@ -492,13 +490,11 @@ class TestVswitchSampleCBDMA(TestCase):
         self.build_vhost_app()
 
         cbdma_enable = self.vm2vm_check_with_two_cbdma(with_cbdma=True, cbdma_num=2, socket_num=2)
-
         self.virtio_user0_pmd.execute_cmd("quit", "#")
         self.virtio_user1_pmd.execute_cmd("quit", "#")
         self.vhost_user.send_expect("^C", "# ", 20)
 
         cbdma_disable = self.vm2vm_check_with_two_cbdma(with_cbdma=False, cbdma_num=2, socket_num=2)
-
         self.virtio_user0_pmd.execute_cmd("quit", "#")
         self.virtio_user1_pmd.execute_cmd("quit", "#")
         self.vhost_user.send_expect("^C", "# ", 20)
@@ -545,7 +541,6 @@ class TestVswitchSampleCBDMA(TestCase):
             self.result_table_add([frame_size, rx_pps])
             rx_throughput[frame_size] = rx_pps
             self.result_table_print()
-
         return rx_throughput
 
     def start_vms_testpmd_and_test(self, launch, quit_vm_testpmd=False):
-- 
2.25.1


                 reply	other threads:[~2021-03-19  6:48 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=20210319064713.4894-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).