[V3] tests/TestSuite_cbdma:fixed session error
diff mbox series

Message ID 1603070978-21454-1-git-send-email-xix.zhang@intel.com
State Accepted
Headers show
Series
  • [V3] tests/TestSuite_cbdma:fixed session error
Related show

Commit Message

Zhang, XiX Oct. 19, 2020, 1:29 a.m. UTC
v1:fixed session error
v2:fixed session error and close new session
v3:fixed session error and close new session at the end of each case


Signed-off-by: xizhan4x <xix.zhang@intel.com>
---
 tests/TestSuite_cbdma.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Zhang, XiX Oct. 19, 2020, 1:29 a.m. UTC | #1
Tested-by: Zhang, XiX <xix.zhang@intel.com>

> -----Original Message-----
> From: xizhan4x [mailto:xix.zhang@intel.com]
> Sent: Monday, October 19, 2020 9:30 AM
> To: dts@dpdk.org
> Cc: Zhang, XiX <xix.zhang@intel.com>
> Subject: [dts][PATCH V3] tests/TestSuite_cbdma:fixed session error
Tu, Lijuan Oct. 22, 2020, 9:04 a.m. UTC | #2
> v1:fixed session error
> v2:fixed session error and close new session v3:fixed session error and close
> new session at the end of each case
> 
> 
> Signed-off-by: xizhan4x <xix.zhang@intel.com>

Applied

Patch
diff mbox series

diff --git a/tests/TestSuite_cbdma.py b/tests/TestSuite_cbdma.py
index 14611f0..6a5be6a 100644
--- a/tests/TestSuite_cbdma.py
+++ b/tests/TestSuite_cbdma.py
@@ -71,6 +71,7 @@  class TestCBDMA(TestCase):
         self.table_header.append("Updating MAC")
         self.table_header.append("% linerate")
         self.result_table_create(self.table_header)
+        self.send_session = self.dut.new_session("new_session")
 
     def get_core_list(self):
         """
@@ -140,7 +141,6 @@  class TestCBDMA(TestCase):
         num is 2
         '''
         # flush other output
-        self.send_session=self.dut.new_session("new_session")
         target = self.app_path.split("/")
         self.send_session.send_expect(f"cd  {'/'.join(target[0:-1])} ", '# ')
         self.send_session.get_session_before(timeout=1)
@@ -310,7 +310,7 @@  class TestCBDMA(TestCase):
                                         ports=dev_info, prefix='cbdma')
             self.launch_ioatfwd_app(eal_params)
             self.send_and_verify_throughput(check_channel=True)
-            self.dut.send_expect('^c', '# ')
+            self.send_session.send_expect('^c', '# ')
         self.result_table_print()
 
     def test_perf_cbdma_with_diff_update_mac(self):
@@ -330,7 +330,7 @@  class TestCBDMA(TestCase):
         self.launch_ioatfwd_app(eal_params)
         self.send_and_verify_throughput(check_channel=False)
 
-        self.dut.send_expect('^c', '# ')
+        self.send_session.send_expect('^c', '# ')
         self.cbdma_updating_mac = 'disable'
         self.launch_ioatfwd_app(eal_params)
         self.send_and_verify_throughput(check_channel=False)
@@ -353,7 +353,7 @@  class TestCBDMA(TestCase):
         self.launch_ioatfwd_app(eal_params)
         self.send_and_verify_throughput(check_channel=False)
 
-        self.dut.send_expect('^c', '# ')
+        self.send_session.send_expect('^c', '# ')
         self.cbdma_copy_mode = 'sw'
         self.launch_ioatfwd_app(eal_params)
         self.send_and_verify_throughput(check_channel=False)
@@ -363,7 +363,8 @@  class TestCBDMA(TestCase):
         """
         Run after each test case.
         """
-        self.dut.send_expect('^c', '# ')
+        self.send_session.send_expect('^c', '# ')
+        self.dut.close_session(self.send_session)
         self.dut.kill_all()
 
     def tear_down_all(self):