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 3485DA04AB; Fri, 8 Nov 2019 06:12:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 011641BF5D; Fri, 8 Nov 2019 06:12:26 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6154E1BF57 for ; Fri, 8 Nov 2019 06:12:24 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2019 21:12:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,280,1569308400"; d="scan'208";a="231678266" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 07 Nov 2019 21:12:23 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 Nov 2019 21:12:23 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 Nov 2019 21:12:22 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by shsmsx102.ccr.corp.intel.com ([169.254.2.108]) with mapi id 14.03.0439.000; Fri, 8 Nov 2019 13:12:20 +0800 From: "Ma, LihongX" To: "Peng, ZhihongX" , "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: AQHVlHicfbtXujYQSEy5qnzcu9Kmq6d/S2fA//99Y4CAAfQLAA== Date: Fri, 8 Nov 2019 05:12:20 +0000 Message-ID: References: <20191106075430.15566-1-zhihongx.peng@intel.com> <218C9AAF1879E445B4BC31BDA3D08502964DE8@CDSMSX102.ccr.corp.intel.com> In-Reply-To: <218C9AAF1879E445B4BC31BDA3D08502964DE8@CDSMSX102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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_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" If like that, I think we should put more time to verify it. -----Original Message----- From: Peng, ZhihongX=20 Sent: Thursday, November 7, 2019 3:21 PM To: Ma, LihongX ; dts@dpdk.org Subject: RE: [dts] [PATCH V1] tests/TestSuite_kernelpf_iavf.py:An abnormal = exit needs to execute the same command as a normal exit. 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 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