From patchwork Fri Oct 16 07:24:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, XiX" X-Patchwork-Id: 81032 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CC265A04DB; Fri, 16 Oct 2020 09:22:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 98F8A1E9BF; Fri, 16 Oct 2020 09:22:34 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 6B8271E985 for ; Fri, 16 Oct 2020 09:22:33 +0200 (CEST) IronPort-SDR: 4v2f2qZo9I9UDe/rckrPb3/kDdO650R0U89Wgp/oisrTPrb9sb6J2AzqsDOy+MluYCIhslhLlv WGdZWHYOobZA== X-IronPort-AV: E=McAfee;i="6000,8403,9775"; a="145855036" X-IronPort-AV: E=Sophos;i="5.77,382,1596524400"; d="scan'208";a="145855036" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2020 00:22:31 -0700 IronPort-SDR: yzMBPexWtzp3Fke6az5JhVZzzd6KhAZnRj528/X+ecZzse8R+08Wda3YTSAq/IEgkyN5pICxzU s5L+ch+stnGg== X-IronPort-AV: E=Sophos;i="5.77,382,1596524400"; d="scan'208";a="531611599" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.182.150]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Oct 2020 00:22:29 -0700 From: xizhan4x To: dts@dpdk.org Cc: xizhan4x Date: Fri, 16 Oct 2020 15:24:19 +0800 Message-Id: <1602833059-13321-1-git-send-email-xix.zhang@intel.com> X-Mailer: git-send-email 2.4.0 Subject: [dts] [PATCH V2] tests/TestSuite_cbdma:fixed-session-error X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" v1:fixed session error v2:fixed session error and close new session Signed-off-by: xizhan4x Tested-by: Zhang, XiX --- 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()