test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tests: modify fortpark part of TestSuite_queue_region.py
@ 2018-01-16  9:17 Peng Yuan
  2018-03-13 17:19 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Yuan @ 2018-01-16  9:17 UTC (permalink / raw)
  To: dts; +Cc: Peng Yuan

Signed-off-by: Peng Yuan <yuan.peng@intel.com>

diff --git a/tests/TestSuite_queue_region.py b/tests/TestSuite_queue_region.py
index 9615388..7315077 100644
--- a/tests/TestSuite_queue_region.py
+++ b/tests/TestSuite_queue_region.py
@@ -135,6 +135,8 @@ class TestQueue_region(TestCase):
         elif (pkt_type == "ipv6_tcp"):
             pkt = Packet(pkt_type='IPv6_TCP')
             pkt.config_layer('ether', {'dst': mac, 'src': self.tester_mac})
+            if (self.nic in ["fortpark_TLV"]):
+                pkt.config_layer('tcp', {'flags': flags})
         elif (pkt_type == "ipv6_sctp"):
             pkt = Packet(pkt_type='IPv6_SCTP')
             pkt.config_layer('ether', {'dst': mac, 'src': self.tester_mac})
@@ -179,7 +181,6 @@ class TestQueue_region(TestCase):
         dump all queue region rules that have been created in memory and compare that total rules number with the given expected number
         to see if they are equal, as to get your conclusion after you have deleted any queue region rule entry.
         """
-        print out
         self.verify("error" not in out, "the queue region settings has error.")
         actual_QRnum = re.findall("region_id.*", out)
         actual_FTnum = re.findall("flowtype_num\D*(\d*).*", out)
@@ -195,6 +196,9 @@ class TestQueue_region(TestCase):
         self.verify(actual_UserPrioritynum == UP_num, "the UP number count error")
 
     def test_pctype_map_queue_region(self):
+        # clear the environment
+        self.dut.send_expect("set port 0 queue-region flush off", "testpmd> ")
+
         # set queue region on a port
         self.dut.send_expect("set port 0 queue-region region_id 0 queue_start_index 1 queue_num 1", "testpmd> ")
         self.dut.send_expect("set port 0 queue-region region_id 1 queue_start_index 3 queue_num 2", "testpmd> ")
@@ -212,7 +216,12 @@ class TestQueue_region(TestCase):
         self.dut.send_expect("set port 0 queue-region region_id 3 flowtype 34", "testpmd> ")
         self.dut.send_expect("set port 0 queue-region region_id 4 flowtype 35", "testpmd> ")
         self.dut.send_expect("set port 0 queue-region region_id 6 flowtype 36", "testpmd> ")
-        self.dut.send_expect("set port 0 queue-region region_id 2 flowtype 41", "testpmd> ")
+
+        # the default UDP packet configuration of fortpark is not consistent with fortville
+        if(self.nic in ["fortpark_TLV"]):
+            self.dut.send_expect("set port 0 queue-region region_id 2 flowtype 39", "testpmd> ")
+        else:
+            self.dut.send_expect("set port 0 queue-region region_id 2 flowtype 41", "testpmd> ")
         self.dut.send_expect("set port 0 queue-region region_id 3 flowtype 43", "testpmd> ")
         self.dut.send_expect("set port 0 queue-region region_id 4 flowtype 44", "testpmd> ")
         self.dut.send_expect("set port 0 queue-region region_id 5 flowtype 45", "testpmd> ")
@@ -250,7 +259,7 @@ class TestQueue_region(TestCase):
         self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv4", frag=1)
 
         queue_region = ["8", "9"]
-        self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv6_tcp")
+        self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv6_tcp", flags="PA")
 
         queue_region = ["11", "12", "13", "14"]
         self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="ipv6_sctp", tag=2)
@@ -276,6 +285,9 @@ class TestQueue_region(TestCase):
         self.get_and_compare_rules(out, 0, 0, 0)
 
     def test_up_map_queue_region(self):
+        # clear the environment
+        self.dut.send_expect("set port 0 queue-region flush off", "testpmd> ")
+
         # set queue region on a port
         self.dut.send_expect("set port 0 queue-region region_id 0 queue_start_index 0 queue_num 1", "testpmd> ")
         self.dut.send_expect("set port 0 queue-region region_id 6 queue_start_index 1 queue_num 8", "testpmd> ")
@@ -290,9 +302,6 @@ class TestQueue_region(TestCase):
 
         # send the packets and verify the results
         queue_region = ["0"]
-        self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="udp", prio=4)
-
-        queue_region = ["0"]
         self.send_and_check(queue_region, mac=self.pf_mac, pkt_type="udp", prio=3)
 
         queue_region = ["1", "2", "3", "4", "5", "6", "7", "8"]
@@ -325,6 +334,9 @@ class TestQueue_region(TestCase):
 
     def test_boundary_values(self):
         # boundary value testing of "Set a queue region on a port"
+        # clear the environment
+        self.dut.send_expect("set port 0 queue-region flush off", "testpmd> ")
+
         # the following parameters can be set successfully
         outstring = self.dut.send_expect("set port 0 queue-region region_id 0 queue_start_index 0 queue_num 16", "testpmd> ")
         self.verify("error" not in outstring, "boundary value check failed")
-- 
2.5.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH] tests: modify fortpark part of TestSuite_queue_region.py
  2018-01-16  9:17 [dts] [PATCH] tests: modify fortpark part of TestSuite_queue_region.py Peng Yuan
@ 2018-03-13 17:19 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2018-03-13 17:19 UTC (permalink / raw)
  To: Peng Yuan, dts

Sorry for forgotten this one. Applied into master branch.

On 01/16/2018 05:17 PM, Peng Yuan wrote:
> Signed-off-by: Peng Yuan<yuan.peng@intel.com>
>
> diff --git a/tests/TestSuite_queue_region.py b/tests/TestSuite_queue_region.py

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-13  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16  9:17 [dts] [PATCH] tests: modify fortpark part of TestSuite_queue_region.py Peng Yuan
2018-03-13 17:19 ` Liu, Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).