From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A0416A034E; Thu, 7 Nov 2019 07:59:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 91BF31E8F2; Thu, 7 Nov 2019 07:59:55 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 289CE1E8A4 for ; Thu, 7 Nov 2019 07:59:54 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 22:59:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,277,1569308400"; d="scan'208";a="201326027" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.203]) by fmsmga007.fm.intel.com with ESMTP; 06 Nov 2019 22:59:52 -0800 From: lihong To: dts@dpdk.org Cc: lihong Date: Thu, 7 Nov 2019 07:34:38 +0800 Message-Id: <1573083278-26890-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] framework/crb: optimization code 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" Signed-off-by: lihong --- framework/crb.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/crb.py b/framework/crb.py index 91f2946..c1f2a1c 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -517,8 +517,7 @@ class Crb(object): self.prefix_list = [] else: self.logger.info('kill_all: called by dut and has no prefix list.') - session = self.create_session('dut_session') - out = session.send_command("ls -l /var/run/dpdk |awk '/^d/ {print $NF}'", timeout=0.5) + out = self.send_command("ls -l /var/run/dpdk |awk '/^d/ {print $NF}'", timeout=0.5, alt_session=True) # the last directory is expect string, eg: [PEXPECT]# if out != '': dir_list = out.split('\r\n') -- 2.7.4