test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V2] tests/TestSuite_cbdma:fixed-session-error
@ 2020-10-16  7:24 xizhan4x
  2020-10-16  7:26 ` Zhang, XiX
  2020-10-16  8:48 ` Ma, LihongX
  0 siblings, 2 replies; 3+ messages in thread
From: xizhan4x @ 2020-10-16  7:24 UTC (permalink / raw)
  To: dts; +Cc: xizhan4x

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dts] [PATCH V2] tests/TestSuite_cbdma:fixed-session-error
  2020-10-16  7:24 [dts] [PATCH V2] tests/TestSuite_cbdma:fixed-session-error xizhan4x
@ 2020-10-16  7:26 ` Zhang, XiX
  2020-10-16  8:48 ` Ma, LihongX
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang, XiX @ 2020-10-16  7:26 UTC (permalink / raw)
  To: Zhang, XiX, dts

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

Tested-by: Zhang, XiX <xix.zhang@intel.com>

> -----Original Message-----
> From: xizhan4x [mailto:xix.zhang@intel.com]
> Sent: Friday, October 16, 2020 3:24 PM
> To: dts@dpdk.org
> Cc: Zhang, XiX <xix.zhang@intel.com>
> Subject: [dts][PATCH V2] tests/TestSuite_cbdma:fixed-session-error


[-- Attachment #2: TestCBDMA.LOG --]
[-- Type: application/octet-stream, Size: 403590 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dts] [PATCH V2] tests/TestSuite_cbdma:fixed-session-error
  2020-10-16  7:24 [dts] [PATCH V2] tests/TestSuite_cbdma:fixed-session-error xizhan4x
  2020-10-16  7:26 ` Zhang, XiX
@ 2020-10-16  8:48 ` Ma, LihongX
  1 sibling, 0 replies; 3+ messages in thread
From: Ma, LihongX @ 2020-10-16  8:48 UTC (permalink / raw)
  To: Zhang, XiX, dts; +Cc: Zhang, XiX


> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of xizhan4x
> Sent: Friday, October 16, 2020 3:24 PM
> To: dts@dpdk.org
> Cc: Zhang, XiX <xix.zhang@intel.com>
> Subject: [dts] [PATCH V2] tests/TestSuite_cbdma:fixed-session-error
> 
> v1:fixed session error
> v2:fixed session error and close new session
> 
> Signed-off-by: xizhan4x <xix.zhang@intel.com>
> ---
>      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

You create the new session in set_up, but destroy it in tear_down_all.
It will invite a issue of create many sessions but only close one in them.


Regards,
Ma,lihong

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16  7:24 [dts] [PATCH V2] tests/TestSuite_cbdma:fixed-session-error xizhan4x
2020-10-16  7:26 ` Zhang, XiX
2020-10-16  8:48 ` Ma, LihongX

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox