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 99F26A04E0; Wed, 27 Nov 2019 10:03:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 82D6C58C3; Wed, 27 Nov 2019 10:03:45 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E5BF05596 for ; Wed, 27 Nov 2019 10:03:43 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2019 01:03:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,248,1571727600"; d="scan'208";a="217346585" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 27 Nov 2019 01:03:42 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 Nov 2019 01:03:42 -0800 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 Nov 2019 01:03:42 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.225]) with mapi id 14.03.0439.000; Wed, 27 Nov 2019 17:03:40 +0800 From: "Tu, Lijuan" To: "Li, WenjieX A" , "dts@dpdk.org" CC: "Li, WenjieX A" Thread-Topic: [dts] [PATCH V1] tests: optimize two suites Thread-Index: AQHVoQIOCPlsj7fpUEaqQYd4uj13C6eewRLQ Date: Wed, 27 Nov 2019 09:03:39 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB6960E@SHSMSX101.ccr.corp.intel.com> References: <1574437390-66321-1-git-send-email-wenjiex.a.li@intel.com> In-Reply-To: <1574437390-66321-1-git-send-email-wenjiex.a.li@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDVmNDBmYmUtODg2OS00OGU3LTgxY2MtN2JjNzUyY2YzYWYwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoia29TbWFcL1JONHJuZnpMY0pOU0poN3B4THJaQisyVXphcUlEa1d2VWxKcytMeVNLY01WXC82dmtmdXdJU1ZEZFN3In0= 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: optimize two suites 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 Wenjie Li > Sent: Friday, November 22, 2019 11:43 PM > To: dts@dpdk.org > Cc: Li, WenjieX A > Subject: [dts] [PATCH V1] tests: optimize two suites >=20 > ensure the DUT port is up before the tester send packets in below suites: > tests/TestSuite_metering_and_policing.py > tests/TestSuite_short_live.py >=20 > Signed-off-by: Wenjie Li > --- > tests/TestSuite_metering_and_policing.py | 8 ++++++-- > tests/TestSuite_short_live.py | 12 ++++++++++++ > 2 files changed, 18 insertions(+), 2 deletions(-) >=20 > diff --git a/tests/TestSuite_metering_and_policing.py > b/tests/TestSuite_metering_and_policing.py > index 77da805..ef8c419 100644 > --- a/tests/TestSuite_metering_and_policing.py > +++ b/tests/TestSuite_metering_and_policing.py > @@ -42,7 +42,7 @@ from test_case import TestCase from plotting import > Plotting from settings import HEADER_SIZE from dut import Dut > - > +from pmd_output import PmdOutput >=20 > class TestMeteringAndPolicing(TestCase): > scapyCmds =3D [] > @@ -244,7 +244,11 @@ class TestMeteringAndPolicing(TestCase): > """ > Send packet and check the stats. If expect_port =3D=3D -1, the p= acket should > be dropped. > """ > - time.sleep(3) > + # check the ports are UP before sending packets > + self.pmd_out =3D PmdOutput(self.dut) > + res =3D self.pmd_out.wait_link_status_up('all', 30) > + self.verify(res is True, 'there have port link is down') > + > rx_before =3D [] > tx_before =3D [] > for i in range(0, len(self.dut_ports)): > diff --git a/tests/TestSuite_short_live.py b/tests/TestSuite_short_live.p= y > index 4e1ee15..dfccbd8 100644 > --- a/tests/TestSuite_short_live.py > +++ b/tests/TestSuite_short_live.py > @@ -141,6 +141,12 @@ class TestShortLiveApp(TestCase): > self.dut.send_expect("set fwd mac", "testpmd>") > self.dut.send_expect("set promisc all off", "testpmd>") > self.dut.send_expect("start", "testpmd>") > + > + # check the ports are UP before sending packets > + self.pmd_out =3D PmdOutput(self.dut) > + res =3D self.pmd_out.wait_link_status_up('all', 30) > + self.verify(res is True, 'there have port link is down') > + > self.check_forwarding([0, 1], self.nic) >=20 > def test_start_up_time(self): > @@ -166,6 +172,12 @@ class TestShortLiveApp(TestCase): > self.dut.send_expect("set fwd mac", "testpmd>") > self.dut.send_expect("set promisc all off", "testpmd>") > self.dut.send_expect("start", "testpmd>") > + > + # check the ports are UP before sending packets > + self.pmd_out =3D PmdOutput(self.dut) > + res =3D self.pmd_out.wait_link_status_up('all', 30) > + self.verify(res is True, 'there have port link is down') > + > self.check_forwarding([0, 1], self.nic) >=20 > # kill with different Signal > -- > 2.17.1