From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1125B2BAD for ; Mon, 19 Dec 2016 04:30:13 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 18 Dec 2016 19:30:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,372,1477983600"; d="scan'208";a="20014392" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 18 Dec 2016 19:30:12 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 18 Dec 2016 19:30:11 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 18 Dec 2016 19:30:11 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.54]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.9]) with mapi id 14.03.0248.002; Mon, 19 Dec 2016 11:30:09 +0800 From: "Yao, Lei A" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1] framework ssh_pexpect: add timeout to avoid file uncomplete during scp file from host to VM Thread-Index: AQHSWaKk2vFBVfcJFUW0Kcvq+eLsN6EOmFsQ//99NgCAAIaWwA== Date: Mon, 19 Dec 2016 03:30:09 +0000 Message-ID: <2DBBFF226F7CF64BAFCA79B681719D953A135F61@shsmsx102.ccr.corp.intel.com> References: <1481871227-4334-1-git-send-email-lei.a.yao@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62D1A457@SHSMSX103.ccr.corp.intel.com> <2DBBFF226F7CF64BAFCA79B681719D953A134F28@shsmsx102.ccr.corp.intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62D1A564@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62D1A564@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] framework ssh_pexpect: add timeout to avoid file uncomplete during scp file from host to VM 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: , X-List-Received-Date: Mon, 19 Dec 2016 03:30:14 -0000 > -----Original Message----- > From: Liu, Yong > Sent: Monday, December 19, 2016 11:25 AM > To: Yao, Lei A ; dts@dpdk.org > Subject: RE: [dts] [PATCH V1] framework ssh_pexpect: add timeout to avoid > file uncomplete during scp file from host to VM >=20 > > > > diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py > > > > index d5b6616..09095a1 100644 > > > > --- a/framework/ssh_pexpect.py > > > > +++ b/framework/ssh_pexpect.py > > > > @@ -185,6 +185,7 @@ class SSHPexpect(object): > > > > if i =3D=3D 1: > > > > time.sleep(0.5) > > > > p.sendline(password) > > > > + time.sleep(10) > > > > p.expect("100%", 60) > > > Expect function has been already wait for about one minute, look like > > there's > > > no need to add more time. > > This timeout is used before sending the ssh cmd. Not waiting time. Duri= ng > > virtualization test, we find the file will always be corrupted when scp > > dpdk.tar.gz from host to vm. Wait 10s after ssh connection set up , the= n > > send scp cmd will resolve this failure. >=20 > The sleep command is after "password" message, so I think connection > between VM and host machine has been created and worked. > What I wonder is that why file is corrupted after "100%" hint. Either exp= ect > worked abnormally or some issues we haven't figured out. >=20 I can't find out the root cause at my side. This issue can't reproduced man= ually because human will always wait 2~3 seconds after ssh connection set u= p , then send scp cmd. Also can't reproduced by pdb. This patch is just th= e practice experience which can avoid this error.=20 >=20 > Thanks, > Marvin