From patchwork Mon Oct 19 01:29:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, XiX" X-Patchwork-Id: 81273 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 93FD4A04DC; Mon, 19 Oct 2020 03:27:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6481EBC7C; Mon, 19 Oct 2020 03:27:54 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id A9641ACD7 for ; Mon, 19 Oct 2020 03:27:52 +0200 (CEST) IronPort-SDR: nedupV9BtD7XLYtKVk77eQTtI8VVJdhHR0MKlO0Wzldf24Fj+YY+2XjXZ0FHlFoY4mkV+CPeCl kLqbQSt0JcKg== X-IronPort-AV: E=McAfee;i="6000,8403,9778"; a="228585006" X-IronPort-AV: E=Sophos;i="5.77,392,1596524400"; d="scan'208";a="228585006" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2020 18:27:50 -0700 IronPort-SDR: qfqgoEu+baPOW/DKTyeoe5RMK3bLmrW92LVCxNqVN38N8h8LORc8WSp9eECO7LtGyrrkvstCMW aBiVAA+MOZ9Q== X-IronPort-AV: E=Sophos;i="5.77,392,1596524400"; d="scan'208";a="532443917" 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; 18 Oct 2020 18:27:49 -0700 From: xizhan4x To: dts@dpdk.org Cc: xizhan4x Date: Mon, 19 Oct 2020 09:29:38 +0800 Message-Id: <1603070978-21454-1-git-send-email-xix.zhang@intel.com> X-Mailer: git-send-email 2.4.0 Subject: [dts] [PATCH V3] 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 v3:fixed session error and close new session at the end of each case 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..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):