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 283B1A00C2; Thu, 23 Apr 2020 07:53:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0AE7C1C29C; Thu, 23 Apr 2020 07:53:15 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 312881C293 for ; Thu, 23 Apr 2020 07:53:13 +0200 (CEST) IronPort-SDR: LW9/XgCI0nZ4Nb4cgJI3mLx1UfPc6QUHRwrvNjOI1j39AF5ElaQGwijBYVtfUXKu2rloc6p3iB lDnqeKmmLwXw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 22:53:12 -0700 IronPort-SDR: VFEdUb90QWGDLHOAtYosd/c43vxzLO5yNXsOd3s+ktRk2OfDpZwWDh2zAz5pPAjbcFxCm9ViHj ieaEwaBhGADg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,305,1583222400"; d="scan'208";a="274124661" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 22 Apr 2020 22:53:11 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 22 Apr 2020 22:52:49 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 22 Apr 2020 22:52:48 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.89]) with mapi id 14.03.0439.000; Thu, 23 Apr 2020 13:52:47 +0800 From: "Tu, Lijuan" To: "Xie, WeiX" , "dts@dpdk.org" CC: "Xie, WeiX" Thread-Topic: [dts] [PATCH V1] tests/vm_hotplug:add link status check and add nic support Thread-Index: AQHWGFJYjvJMzQTjGEKz5baaxyimaKiGNiXw Date: Thu, 23 Apr 2020 05:52:46 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC0F1C7@SHSMSX101.ccr.corp.intel.com> References: <1587524096-369703-1-git-send-email-weix.xie@intel.com> In-Reply-To: <1587524096-369703-1-git-send-email-weix.xie@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-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/vm_hotplug:add link status check and add nic support 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 Xie,WeiX > Sent: Wednesday, April 22, 2020 10:55 AM > To: dts@dpdk.org > Cc: Xie, WeiX > Subject: [dts] [PATCH V1] tests/vm_hotplug:add link status check and add = nic > support >=20 > From: "Xie,WeiX" >=20 > check link status after start,and add NIC supported >=20 > Signed-off-by: Xie,WeiX > --- > tests/TestSuite_vm_hotplug.py | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) >=20 > diff --git a/tests/TestSuite_vm_hotplug.py b/tests/TestSuite_vm_hotplug.p= y > index 8fd1de7..dd31272 100644 > --- a/tests/TestSuite_vm_hotplug.py > +++ b/tests/TestSuite_vm_hotplug.py > @@ -247,16 +247,28 @@ class TestVmHotplug(TestCase): > result.append(cap_num[0]) > return result >=20 > + def check_link_status(self, vm_info): > + loop =3D 1 > + while (loop <=3D 3): > + out =3D vm_info.execute_cmd("show port info all", "testpmd> = ", 120) > + port_status =3D re.findall("Link\s*status:\s*([a-z]*)", out) > + if ("down" not in port_status): > + break > + time.sleep(3) > + loop +=3D 1 > + self.verify("down" not in port_status, "port can not up after > + start") > + > def verify_rxtx_only(self): > # rxonly > self.vm_testpmd.execute_cmd('set fwd rxonly') > self.vm_testpmd.execute_cmd('set verbose 1') > self.vm_testpmd.execute_cmd('port start all') > self.vm_testpmd.execute_cmd('start') > - time.sleep(1) > + self.check_link_status(self.vm_testpmd) >=20 > self.send_packet() > out =3D self.vm0_dut.get_session_output() > + time.sleep(1) > self.verify(self.vf0_mac in out, 'vf0 receive packet fail') > if self.device =3D=3D 2: > self.verify(self.vf1_mac in out, 'vf1 receive packet fail') = @@ -279,7 > +291,7 @@ class TestVmHotplug(TestCase): > def check_vf_device(self, has_device=3DTrue, device=3D1): > time.sleep(1) > sign =3D 'Connection' > - lis1 =3D ['fortville_spirit', 'fortville_eagle'] > + lis1 =3D ['fortville_spirit', 'fortville_eagle', 'sagepond', > + 'twinpond', 'sageville'] > lis2 =3D ['fortpark_TLV', 'fortville_25g',"fortpark_BASE-T"] > if self.nic in lis1: > sign =3D 'Ethernet' > @@ -300,6 +312,7 @@ class TestVmHotplug(TestCase): > self.host_session.send_expect('device_add vfio-pci,host=3D%s,id= =3Ddev1' % > self.dut.ports_info[0]['pci'], '(qemu)') > if device =3D=3D 2: > self.host_session.send_expect('device_add vfio-pci,host=3D%s= ,id=3Ddev2' % > self.dut.ports_info[1]['pci'], '(qemu)') > + time.sleep(3) > self.check_vf_device(has_device=3DTrue, device=3Ddevice) > self.vm_session.send_expect('./usertools/dpdk-devbind.py -b vfio= - > pci %s' % self.vf_pci0, '#') > if device =3D=3D 2: > -- > 1.8.3.1