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 9E8D05921 for ; Tue, 25 Oct 2016 08:39:10 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP; 24 Oct 2016 23:39:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,545,1473145200"; d="scan'208";a="23368640" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 24 Oct 2016 23:39:09 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 24 Oct 2016 23:39:09 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 24 Oct 2016 23:39:08 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.139]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.96]) with mapi id 14.03.0248.002; Tue, 25 Oct 2016 14:36:22 +0800 From: "Liu, Yong" To: "Xu, GangX" , "dts@dpdk.org" CC: "Xu, GangX" Thread-Topic: [dts] [PATCH V1] fix scp error on FreeBSD Thread-Index: AQHSLogPaIDV/kOK80WRCXN2d8YZrKC4trfg Date: Tue, 25 Oct 2016 06:36:21 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E60309014@SHSMSX103.ccr.corp.intel.com> References: <1477376546-2506-1-git-send-email-gangx.xu@intel.com> In-Reply-To: <1477376546-2506-1-git-send-email-gangx.xu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjllZjQ3YjgtMWUzNS00YzA4LWJjZjItMDYxZDZhMDI0MGI1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InlFVVh5ek1lZXJBcXNRQ3ZDNTVKSVU3aTlIc2tBbGc4SVVVSXJaZFAyZDg9In0= x-ctpclassification: CTP_IC 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] fix scp error on FreeBSD 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: Tue, 25 Oct 2016 06:39:11 -0000 Hi Gang, I think code [pP] can just fix this issue. All you need is that change the= first line as second line. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,gang > Sent: Tuesday, October 25, 2016 2:22 PM > To: dts@dpdk.org > Cc: Xu, GangX > Subject: [dts] [PATCH V1] fix scp error on FreeBSD >=20 > when scp something to FreeBSD the prompt is different with other > ex:FreeBSD is "Password for root@freeBSD:" > Fedora is "root@xx.xxx.xxx.xxx's password:" >=20 > Signed-off-by: xu,gang > --- > framework/ssh_pexpect.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py > index 1abf8a1..7bad5f5 100644 > --- a/framework/ssh_pexpect.py > +++ b/framework/ssh_pexpect.py > @@ -176,11 +176,11 @@ class SSHPexpect(object): > p =3D pexpect.spawn(scp_cmd) > time.sleep(0.5) > ssh_newkey =3D 'Are you sure you want to continue connecting' > - i =3D p.expect([ssh_newkey, 'password: ', "# ", pexpect.EOF, > + i =3D p.expect([ssh_newkey, '.*ssword', "# ", pexpect.EOF, > pexpect.TIMEOUT], 120) > if i =3D=3D 0: # add once in trust list > p.sendline('yes') > - i =3D p.expect([ssh_newkey, '[pP]assword: ', pexpect.EOF], 2= ) > + i =3D p.expect([ssh_newkey, '.*ssword', pexpect.EOF], 2) >=20 > if i =3D=3D 1: > time.sleep(0.5) > -- > 1.9.3