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 82379A0613 for ; Wed, 28 Aug 2019 12:45:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4F0A02C4F; Wed, 28 Aug 2019 12:45:48 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id BAA8B1BF08 for ; Wed, 28 Aug 2019 12:45:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2019 03:45:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,440,1559545200"; d="scan'208";a="210125342" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 28 Aug 2019 03:45:45 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 28 Aug 2019 03:45:45 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 28 Aug 2019 03:45:45 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by shsmsx102.ccr.corp.intel.com ([169.254.2.19]) with mapi id 14.03.0439.000; Wed, 28 Aug 2019 18:45:43 +0800 From: "Tu, Lijuan" To: "Li, WenjieX A" , "dts@dpdk.org" CC: "Li, WenjieX A" Thread-Topic: [dts] [PATCH V2] tests/kni:del the ip before verify results Thread-Index: AQHVU96d+ZsHJC86QUGwhImg1h8NE6cQc7Tw Date: Wed, 28 Aug 2019 10:45:42 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB06D0B@SHSMSX101.ccr.corp.intel.com> References: <1565956378-40658-1-git-send-email-wenjiex.a.li@intel.com> In-Reply-To: <1565956378-40658-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDRjZmRjNGUtY2NhYi00YTE0LTkyZTYtNjUxMjBiZDVkZTEyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiY0NlQ1NrSWJmK1F6RnNpQmlXK3JqeUhoZ0FPSFFxSGRPVXlhVGdpYnhcLzNMNkt4dUc5eWNGbVI3bWtHaTFlRngifQ== 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 V2] tests/kni:del the ip before verify results 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, August 16, 2019 7:53 PM > To: dts@dpdk.org > Cc: Li, WenjieX A > Subject: [dts] [PATCH V2] tests/kni:del the ip before verify results >=20 > Remove the ip from tester before verify results; otehrwise, if the case i= s fail, > the ip is still existing on tester. >=20 > Signed-off-by: Wenjie Li > --- >=20 > V2: delete the dupicate "ip addr del..." >=20 > tests/TestSuite_kni.py | 24 ++++++++++-------------- > 1 file changed, 10 insertions(+), 14 deletions(-) >=20 > diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index > f1f85df..0fa5113 100644 > --- a/tests/TestSuite_kni.py > +++ b/tests/TestSuite_kni.py > @@ -579,20 +579,19 @@ class TestKni(TestCase): >=20 > virtual_interface =3D self.virtual_interface_name(port) >=20 > - out =3D self.dut.send_expect( > + out1 =3D self.dut.send_expect( > "ping -w 2 -I %s 192.168.%d.2" % (virtual_interface, por= t), "# ", 10) > - self.verify("64 bytes from 192.168.%d.2:" % > - port in out, "ping not supported") > - > - out =3D self.tester.send_expect( > + out2 =3D self.tester.send_expect( > "ping -w 1 -I %s 192.168.%d.1" % (tx_interface, port), "= # ", 10) > - self.verify("64 bytes from 192.168.%d.1:" % > - port in out, "kni cannot reply ping packet") > - > - out =3D self.dut.send_expect( > + out3 =3D self.dut.send_expect( > "ping -w 1 -I %s 192.168.%d.123" % (virtual_interface, p= ort), "# ", 10) > - self.verify( > - "0 received, 100% packet loss" in out, "ping not support= ed") > + > + # remove ip from tester > + self.tester.send_expect("ip addr del 192.168.%d.2 dev %s" % > + (port, tx_interface), "# ") > + > + self.verify("64 bytes from 192.168.%d.2:" %port in out1, "pi= ng not > supported") > + self.verify("64 bytes from 192.168.%d.1:" %port in out2, "kn= i cannot > reply ping packet") > + self.verify("0 received, 100% packet loss" in out3, "ping > + not supported") >=20 > out =3D self.dut.send_expect( > "ip -family inet6 address show dev %s | awk '/inet6/ { p= rint $2 }'| > cut -d'/' -f1" % virtual_interface, "# ", 10) @@ -622,9 +621,6 @@ class > TestKni(TestCase): > (virtual_interface, ''.join(ipv6l= ist)), "# ", 10) > self.verify( > "0 received, 100% packet loss" in out, "ping6 not suppor= ted") > - # remove ip from tester > - self.tester.send_expect( > - "ip addr del 192.168.%d.2 dev %s" % (port, tx_interface= ), "# ") >=20 > for port in self.config['ports']: > tx_port =3D self.tester.get_local_port(port) > -- > 2.17.1