From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id BB066326C for ; Sat, 29 Dec 2018 08:57:05 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Dec 2018 23:57:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,412,1539673200"; d="scan'208";a="133781976" Received: from dts-maintain.sh.intel.com (HELO [10.67.119.110]) ([10.67.119.110]) by fmsmga001.fm.intel.com with ESMTP; 28 Dec 2018 23:57:03 -0800 To: Peng Yuan , dts@dpdk.org References: <1545991831-10569-1-git-send-email-yuan.peng@intel.com> From: Lijuan Tu Message-ID: Date: Sun, 30 Dec 2018 00:24:46 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1545991831-10569-1-git-send-email-yuan.peng@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 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 07:57:06 -0000 Applied, thanks On 2018年12月28日 18:10, Peng Yuan wrote: > change the checking method of result when flushed the queue-region rules. > > Signed-off-by: Peng Yuan > > 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 = self.get_queue_number() > self.verify(queue in queue_region, "the packet doesn't enter the expected queue region.") > + return queue > > def send_packet_pctype(self, mac, pkt_type="udp", frag=0, flags=None, tag=None, ethertype=None): > """ > @@ -230,7 +231,7 @@ class TestQueue_region(TestCase): > # 7 | 10 | 46 | Frag_IPv6 > # send the packets and verify the results > queue_region = ["1"] > - self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="udp") > + queue_udp = self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="udp") > > # fortville can't parse the TCP SYN type packet, fortpark can parse it. > if(self.nic in ["fortpark_TLV"]): > @@ -245,10 +246,10 @@ class TestQueue_region(TestCase): > > # not assign ipv4-sctp packet to any queue region, the packet to queue region 0. > queue_region = ["1"] > - self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="sctp", tag=1) > + queue_sctp = self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="sctp", tag=1) > > queue_region = ["11", "12", "13", "14"] > - self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv4") > + queue_ipv4 = self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv4") > > queue_region = ["5"] > self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv4", frag=1) > @@ -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 = ["1"] > - self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv6_tcp") > + queue_ipv6tcp = self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv6_tcp") > else: > queue_region = ["8", "9"] > - self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv6_tcp") > + queue_ipv6tcp = self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv6_tcp") > > queue_region = ["11", "12", "13", "14"] > self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv6_sctp", tag=2) > @@ -287,19 +288,19 @@ class TestQueue_region(TestCase): > out = self.dut.send_expect("show port 0 queue-region", "testpmd> ") > self.get_and_compare_rules(out, 0, 0, 0) > > - # 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=self.pf_mac, pkt_type="udp") > queue = self.get_queue_number() > - self.verify(queue not in ["1"], "the queue regions have not been flushed clearly.") > + self.verify(queue != queue_udp, "the queue regions have not been flushed clearly.") > self.send_packet_pctype(mac=self.pf_mac, pkt_type="sctp") > queue = self.get_queue_number() > - self.verify(queue not in ["1"], "the queue regions have not been flushed clearly.") > + self.verify(queue != queue_sctp, "the queue regions have not been flushed clearly.") > self.send_packet_pctype(mac=self.pf_mac, pkt_type="ipv4") > queue = self.get_queue_number() > - self.verify(queue not in ["10", "11", "12", "13"], "the queue regions have not been flushed clearly.") > + self.verify(queue != queue_ipv4, "the queue regions have not been flushed clearly.") > self.send_packet_pctype(mac=self.pf_mac, pkt_type="ipv6_tcp") > queue = self.get_queue_number() > - self.verify(queue not in ["8", "9"], "the queue regions have not been flushed clearly.") > + self.verify(queue != queue_ipv6tcp, "the queue regions have not been flushed clearly.") > > 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=self.pf_mac, pkt_type="ipv6_udp", prio=1) > > queue_region = ["10", "11", "12", "13"] > - self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="tcp", prio=2) > + queue_tcp = self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="tcp", prio=2) > > queue_region = ["10", "11", "12", "13"] > self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="tcp", prio=7) > > queue_region = ["10", "11", "12", "13"] > - self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="udp", prio=7) > + queue_udp = self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="udp", prio=7) > > self.send_packet_pctype(mac=self.pf_mac, pkt_type="udp") > queue = 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=self.pf_mac, pkt_type="udp", prio=7) > queue = self.get_queue_number() > - self.verify(queue not in ["10", "11", "12", "13"], "the queue regions have not been flushed clearly.") > + self.verify(queue != queue_udp, "the queue regions have not been flushed clearly.") > self.send_packet_up(mac=self.pf_mac, pkt_type="tcp", prio=2) > queue = self.get_queue_number() > - self.verify(queue not in ["10", "11", "12", "13"], "the queue regions have not been flushed clearly.") > + self.verify(queue != queue_tcp, "the queue regions have not been flushed clearly.") > > def test_boundary_values(self): > # boundary value testing of "Set a queue region on a port"