From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id DED6B1B1FD for ; Sat, 29 Dec 2018 02:36:02 +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 orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Dec 2018 17:36:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,411,1539673200"; d="scan'208";a="305896523" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 28 Dec 2018 17:36:01 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 28 Dec 2018 17:36:01 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 28 Dec 2018 17:36:00 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.196]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.44]) with mapi id 14.03.0415.000; Sat, 29 Dec 2018 09:35:58 +0800 From: "Zhu, ShuaiX" To: "Peng, Yuan" , "dts@dpdk.org" CC: "Peng, Yuan" , "Zhu, ShuaiX" Thread-Topic: [dts] [PATCH] tests: change checking method for queue-region rule. Thread-Index: AQHUnp/+5xEh7bvnkk+1nj2djhoTXqWU8C3g Date: Sat, 29 Dec 2018 01:35:58 +0000 Message-ID: <4DC48DF9BDA3E54A836D2D3C057DEC6F0B123D7E@SHSMSX101.ccr.corp.intel.com> References: <1545996504-12569-1-git-send-email-yuan.peng@intel.com> In-Reply-To: <1545996504-12569-1-git-send-email-yuan.peng@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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] tests: change checking method for queue-region rule. 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: , X-List-Received-Date: Sat, 29 Dec 2018 01:36:03 -0000 Tested-by:Zhu, ShuaiX > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Yuan > Sent: Friday, December 28, 2018 7:28 PM > To: dts@dpdk.org > Cc: Peng, Yuan > Subject: [dts] [PATCH] tests: change checking method for queue-region rul= e. >=20 > change the checking method of result when flushed the queue-region rules. >=20 > Signed-off-by: Peng Yuan >=20 > diff --git a/tests/TestSuite_queue_region.py > b/tests/TestSuite_queue_region.py index e971c46..5f4dbf4 100644 > --- a/tests/TestSuite_queue_region.py > +++ b/tests/TestSuite_queue_region.py > @@ -109,6 +109,7 @@ class TestQueue_region(TestCase): > self.send_packet_up(mac, pkt_type, prio) > queue =3D self.get_queue_number() > self.verify(queue in queue_region, "the packet doesn't enter the > expected queue region.") > + return queue >=20 > def send_packet_pctype(self, mac, pkt_type=3D"udp", frag=3D0, flags= =3DNone, > tag=3DNone, ethertype=3DNone): > """ > @@ -230,7 +231,7 @@ class TestQueue_region(TestCase): > # 7 | 10 | 46 | Frag_IPv6 > # send the packets and verify the results > queue_region =3D ["1"] > - self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"udp") > + queue_udp =3D self.send_and_check(queue_region, mac=3Dself.pf_ma= c, > + pkt_type=3D"udp") >=20 > # fortville can't parse the TCP SYN type packet, fortpark can pa= rse it. > if(self.nic in ["fortpark_TLV"]): > @@ -245,10 +246,10 @@ class TestQueue_region(TestCase): >=20 > # not assign ipv4-sctp packet to any queue region, the packet to > queue region 0. > queue_region =3D ["1"] > - self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"sctp", tag=3D1) > + queue_sctp =3D self.send_and_check(queue_region, > mac=3Dself.pf_mac, > + pkt_type=3D"sctp", tag=3D1) >=20 > queue_region =3D ["11", "12", "13", "14"] > - self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"ipv4") > + queue_ipv4 =3D self.send_and_check(queue_region, mac=3Dself.pf_m= ac, > + pkt_type=3D"ipv4") >=20 > queue_region =3D ["5"] > self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"ipv4", frag=3D1) @@ -258,10 +259,10 @@ class > TestQueue_region(TestCase): > # not assign ipv4-tcp SYN packet to any queue region, the packet= to > queue region 0. > if(self.nic in ["fortpark_TLV"]): > queue_region =3D ["1"] > - self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"ipv6_tcp") > + queue_ipv6tcp =3D self.send_and_check(queue_region, > + mac=3Dself.pf_mac, pkt_type=3D"ipv6_tcp") > else: > queue_region =3D ["8", "9"] > - self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"ipv6_tcp") > + queue_ipv6tcp =3D self.send_and_check(queue_region, > + mac=3Dself.pf_mac, pkt_type=3D"ipv6_tcp") >=20 > queue_region =3D ["11", "12", "13", "14"] > self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"ipv6_sctp", tag=3D2) @@ -287,19 +288,19 @@ class > TestQueue_region(TestCase): > out =3D self.dut.send_expect("show port 0 queue-region", "testpm= d> > ") > self.get_and_compare_rules(out, 0, 0, 0) >=20 > - # confirm packet not to the same queue after flush all the queue > region rull. > + # confirm packet not to the same queue after flush all the queue > regions rull. > self.send_packet_pctype(mac=3Dself.pf_mac, pkt_type=3D"udp") > queue =3D self.get_queue_number() > - self.verify(queue not in ["1"], "the queue regions have not been > flushed clearly.") > + self.verify(queue !=3D queue_udp, "the queue regions have not > + been flushed clearly.") > self.send_packet_pctype(mac=3Dself.pf_mac, pkt_type=3D"sctp") > queue =3D self.get_queue_number() > - self.verify(queue not in ["1"], "the queue regions have not been > flushed clearly.") > + self.verify(queue !=3D queue_sctp, "the queue regions have not > + been flushed clearly.") > self.send_packet_pctype(mac=3Dself.pf_mac, pkt_type=3D"ipv4") > queue =3D self.get_queue_number() > - self.verify(queue not in ["10", "11", "12", "13"], "the queue re= gions > have not been flushed clearly.") > + self.verify(queue !=3D queue_ipv4, "the queue regions have not > + been flushed clearly.") > self.send_packet_pctype(mac=3Dself.pf_mac, pkt_type=3D"ipv6_tcp"= ) > queue =3D self.get_queue_number() > - self.verify(queue not in ["8", "9"], "the queue regions have not= been > flushed clearly.") > + self.verify(queue !=3D queue_ipv6tcp, "the queue regions have no= t > + been flushed clearly.") >=20 > def test_up_map_queue_region(self): > # set queue region on a port > @@ -330,13 +331,13 @@ class TestQueue_region(TestCase): > self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"ipv6_udp", prio=3D1) >=20 > queue_region =3D ["10", "11", "12", "13"] > - self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"tcp", prio=3D2) > + queue_tcp =3D self.send_and_check(queue_region, mac=3Dself.pf_ma= c, > + pkt_type=3D"tcp", prio=3D2) >=20 > queue_region =3D ["10", "11", "12", "13"] > self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"tcp", prio=3D7) >=20 > queue_region =3D ["10", "11", "12", "13"] > - self.send_and_check(queue_region, mac=3Dself.pf_mac, > pkt_type=3D"udp", prio=3D7) > + queue_udp =3D self.send_and_check(queue_region, mac=3Dself.pf_ma= c, > + pkt_type=3D"udp", prio=3D7) >=20 > self.send_packet_pctype(mac=3Dself.pf_mac, pkt_type=3D"udp") > queue =3D self.get_queue_number() @@ -352,10 +353,10 @@ class > TestQueue_region(TestCase): > # confirm packet not to the same queue after flush all the queue > region rull. > self.send_packet_up(mac=3Dself.pf_mac, pkt_type=3D"udp", prio=3D= 7) > queue =3D self.get_queue_number() > - self.verify(queue not in ["10", "11", "12", "13"], "the queue re= gions > have not been flushed clearly.") > + self.verify(queue !=3D queue_udp, "the queue regions have not > + been flushed clearly.") > self.send_packet_up(mac=3Dself.pf_mac, pkt_type=3D"tcp", prio=3D= 2) > queue =3D self.get_queue_number() > - self.verify(queue not in ["10", "11", "12", "13"], "the queue re= gions > have not been flushed clearly.") > + self.verify(queue !=3D queue_tcp, "the queue regions have not > + been flushed clearly.") >=20 > def test_boundary_values(self): > # boundary value testing of "Set a queue region on a port" > -- > 2.5.0