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 D28D6A3160 for ; Sat, 12 Oct 2019 07:59:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D0551BECD; Sat, 12 Oct 2019 07:59:58 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 92EC61BECC for ; Sat, 12 Oct 2019 07:59:57 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2019 22:59:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,286,1566889200"; d="scan'208";a="200986887" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 11 Oct 2019 22:59:56 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 11 Oct 2019 22:59:56 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 11 Oct 2019 22:59:55 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX153.ccr.corp.intel.com ([10.239.6.53]) with mapi id 14.03.0439.000; Sat, 12 Oct 2019 13:59:53 +0800 From: "Tu, Lijuan" To: "Zhang, YanX A" , "dts@dpdk.org" CC: "Zhang, YanX A" Thread-Topic: [dts] [PATCH V1] tests/TestSuite_vm_hotplug:Optimize scripts and enable scripts to support more NICs Thread-Index: AQHVfw91/45qhziiNkapYzs6CYJ5qKdWhmCA Date: Sat, 12 Oct 2019 05:59:53 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB3EC02@SHSMSX101.ccr.corp.intel.com> References: <1570673532-49057-1-git-send-email-yanx.a.zhang@intel.com> In-Reply-To: <1570673532-49057-1-git-send-email-yanx.a.zhang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjVmNWVlYzctNjlkMy00MGU0LTgyYzItZDBlMmJiZWVjOGUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib1VnbjZIQWlib2VBR0xNR1pMNFRaTW5RVU9qU0k1dUJYdDQ0bTFORjF0azNwMlUwVjZmTEVqUFNBWW9wbXlTVCJ9 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] tests/TestSuite_vm_hotplug:Optimize scripts and enable scripts to support more NICs 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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhang,yan > Sent: Thursday, October 10, 2019 10:12 AM > To: dts@dpdk.org > Cc: Zhang, YanX A > Subject: [dts] [PATCH V1] tests/TestSuite_vm_hotplug:Optimize scripts and > enable scripts to support more NICs >=20 > Optimize scripts and enable scripts to support more NICs. >=20 > Signed-off-by: zhang,yan > --- > tests/TestSuite_vm_hotplug.py | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) >=20 > diff --git a/tests/TestSuite_vm_hotplug.py b/tests/TestSuite_vm_hotplug.p= y > index 87edad6..438f404 100644 > --- a/tests/TestSuite_vm_hotplug.py > +++ b/tests/TestSuite_vm_hotplug.py > @@ -36,7 +36,7 @@ DPDK Test suite. > Test some vm hotplug function with vfio >=20 > """ > - > +import os > import re > import time > from qemu_kvm import QEMUKvm > @@ -138,6 +138,9 @@ class TestVmHotplug(TestCase): > except Exception, EnvironmentError: > pass > if '10.0.2' in out: > + pos =3D self.vm0.hostfwd_addr.find(':') > + ssh_key =3D '[' + self.vm0.hostfwd_addr[:pos] + ']' + > self.vm0.hostfwd_addr[pos:] > + os.system('ssh-keygen -R %s' % ssh_key) > break > time.sleep(1) > cur_time =3D time.time() > @@ -276,8 +279,12 @@ class TestVmHotplug(TestCase): > def check_vf_device(self, has_device=3DTrue, device=3D1): > time.sleep(1) > sign =3D 'Connection' > - if self.nic.startswith('fortville'): > + lis1 =3D ['fortville_spirit', 'fortville_eagle'] > + lis2 =3D ['fortpark_TLV', 'fortville_25g'] > + if self.nic in lis1: > sign =3D 'Ethernet' > + elif self.nic in lis2: > + sign =3D 'Device' > out =3D self.vm_session.send_expect('./usertools/dpdk-devbind.py= -s | > grep %s' % sign, '#') > time.sleep(2) > if has_device: > -- > 2.17.2