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 45C58A034E; Thu, 7 Nov 2019 08:10:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 368151E904; Thu, 7 Nov 2019 08:10:44 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 4D6901E87D for ; Thu, 7 Nov 2019 08:10:43 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 23:10:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,277,1569308400"; d="scan'208";a="404009002" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 06 Nov 2019 23:10:42 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 23:10:42 -0800 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 23:10:41 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.215]) with mapi id 14.03.0439.000; Thu, 7 Nov 2019 15:10:39 +0800 From: "Ma, LihongX" To: "Peng, ZhihongX" , "dts@dpdk.org" CC: "Peng, ZhihongX" 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 Date: Thu, 7 Nov 2019 07:10:39 +0000 Message-ID: References: <20191106075430.15566-1-zhihongx.peng@intel.com> In-Reply-To: <20191106075430.15566-1-zhihongx.peng@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" 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