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 A955AA034E; Thu, 7 Nov 2019 08:21:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7E2F01E905; Thu, 7 Nov 2019 08:21:13 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 0F90A1E8B2 for ; Thu, 7 Nov 2019 08:21:11 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 23:21:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,277,1569308400"; d="scan'208";a="200960381" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga008.fm.intel.com with ESMTP; 06 Nov 2019 23:21:11 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 23:21:10 -0800 Received: from cdsmsx152.ccr.corp.intel.com (172.17.4.41) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 23:21:10 -0800 Received: from cdsmsx102.ccr.corp.intel.com ([169.254.2.162]) by CDSMSX152.ccr.corp.intel.com ([169.254.6.195]) with mapi id 14.03.0439.000; Thu, 7 Nov 2019 15:21:08 +0800 From: "Peng, ZhihongX" To: "Ma, LihongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1] tests/TestSuite_kernelpf_iavf.py:An abnormal exit needs to execute the same command as a normal exit. Thread-Index: AQHVlTp2okLW8ISp9E27Q7vVY2VwtKd/SwDg Date: Thu, 7 Nov 2019 07:21:07 +0000 Message-ID: <218C9AAF1879E445B4BC31BDA3D08502964DE8@CDSMSX102.ccr.corp.intel.com> References: <20191106075430.15566-1-zhihongx.peng@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.6.105] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/TestSuite_kernelpf_iavf.py:An abnormal exit needs to execute the same command as a normal exit. 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" This case is executed twice, because the case was executed once when it was= successful, so the exception exit is executed once for consistency. -----Original Message----- From: Ma, LihongX=20 Sent: Thursday, November 7, 2019 3:11 PM To: Peng, ZhihongX ; dts@dpdk.org Cc: Peng, ZhihongX Subject: RE: [dts] [PATCH V1] tests/TestSuite_kernelpf_iavf.py:An abnormal = exit needs to execute the same command as a normal exit. Hi, zhihong I saw the cmd ' self.dut.send_expect("ip link set dev %s vf 0 trust off" % = self.host_intf, "# ")' have been execute in tear_down So I think you don't = need execute it before every verify. -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Zhihong Sent: Wednesday, November 6, 2019 3:55 PM To: dts@dpdk.org Cc: Peng, ZhihongX Subject: [dts] [PATCH V1] tests/TestSuite_kernelpf_iavf.py:An abnormal exit= needs to execute the same command as a normal exit. An abnormal exit needs to execute the same command as a normal exit. Signed-off-by: Peng Zhihong --- tests/TestSuite_kernelpf_iavf.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_ia= vf.py index 668eb28..89c22d3 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -47,6 +47,7 @@ from pmd_output import PmdOutput from settings import HE= ADER_SIZE from packet import Packet from utils import RED +from exception import VerifyFailure =20 VM_CORES_MASK =3D 'all' MAX_VLAN =3D 4095 @@ -336,18 +337,27 @@ class TestKernelpfIavf(TestCase): self.vm_testpmd.execute_cmd("start") self.send_random_pkt(self.vf_mac, count=3D1) out =3D self.vm_dut.get_session_output() - self.verify(self.vf_mac in out, 'vf receive pkt fail with current = mac') + if self.vf_mac not in out: + self.dut.send_expect("ip link set dev %s vf 0 trust off" % sel= f.host_intf, "# ") + raise VerifyFailure('allmulti all off vf receive pkt fail=20 + with current mac') self.send_random_pkt(multicast_mac, count=3D1) out =3D self.vm_dut.get_session_output() - self.verify(multicast_mac not in out, 'vf receive pkt with multica= st mac') + if multicast_mac in out: + self.dut.send_expect("ip link set dev %s vf 0 trust off" % sel= f.host_intf, "# ") + raise VerifyFailure('allmulti all off vf receive pkt with=20 + multicast mac') =20 self.vm_testpmd.execute_cmd("set allmulti all on") self.send_random_pkt(self.vf_mac, count=3D1) out =3D self.vm_dut.get_session_output() - self.verify(self.vf_mac in out, 'vf receive pkt fail with current = mac') + if self.vf_mac not in out: + self.dut.send_expect("ip link set dev %s vf 0 trust off" % sel= f.host_intf, "# ") + raise VerifyFailure('allmulti all on vf receive pkt fail=20 + with current mac') self.send_random_pkt(multicast_mac, count=3D1) out =3D self.vm_dut.get_session_output() - self.verify(multicast_mac in out, 'vf receive pkt fail with multic= ast mac') + if multicast_mac not in out: + self.dut.send_expect("ip link set dev %s vf 0 trust off" % sel= f.host_intf, "# ") + raise VerifyFailure('allmulti all on vf receive pkt fail=20 + with multicast mac') + self.dut.send_expect("ip link set dev %s vf 0 trust off" % self.ho= st_intf, "# ") =20 def test_vf_broadcast(self): -- 2.17.1