test suite reviews and discussions
 help / color / mirror / Atom feed
From: xizhan4x <xix.zhang@intel.com>
To: dts@dpdk.org
Cc: xizhan4x <xix.zhang@intel.com>
Subject: [dts] [PATCH V2] tests/TestSuite_cbdma:fixed-session-error
Date: Fri, 16 Oct 2020 15:24:19 +0800	[thread overview]
Message-ID: <1602833059-13321-1-git-send-email-xix.zhang@intel.com> (raw)

v1:fixed session error
v2:fixed session error and close new session

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

diff --git a/tests/TestSuite_cbdma.py b/tests/TestSuite_cbdma.py
index 14611f0..1e5014b 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,11 +363,12 @@ class TestCBDMA(TestCase):
         """
         Run after each test case.
         """
-        self.dut.send_expect('^c', '# ')
+        self.send_session.send_expect('^c', '# ')
         self.dut.kill_all()
 
     def tear_down_all(self):
         """
         Run after each test suite.
         """
+        self.dut.close_session(self.send_session)
         self.bind_cbdma_device_to_kernel()
-- 
1.8.3.1


             reply	other threads:[~2020-10-16  7:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16  7:24 xizhan4x [this message]
2020-10-16  7:26 ` Zhang, XiX
2020-10-16  8:48 ` Ma, LihongX

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=1602833059-13321-1-git-send-email-xix.zhang@intel.com \
    --to=xix.zhang@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).