test suite reviews and discussions
 help / color / mirror / Atom feed
* Re: [dts] [PATCH V1 0/2]tests/cvl_advanced_rss
  2020-06-18 14:45 [dts] [PATCH V1 0/2]tests/cvl_advanced_rss Zeng Xiaoxiao
@ 2020-06-18  6:12 ` Zeng, XiaoxiaoX
  2020-06-18 14:45 ` [dts] [PATCH V1 1/2] optimize cvl_advanced_rss code Zeng Xiaoxiao
  2020-06-18 14:45 ` [dts] [PATCH V1 2/2] optimize cvl_advanced_rss verify function Zeng Xiaoxiao
  2 siblings, 0 replies; 4+ messages in thread
From: Zeng, XiaoxiaoX @ 2020-06-18  6:12 UTC (permalink / raw)
  To: dts


Sorry, Please ignore this set of patch


Best regards,
Zeng,xiaoxiao

> -----Original Message-----
> From: Zeng, XiaoxiaoX <xiaoxiaox.zeng@intel.com>
> Sent: Thursday, June 18, 2020 10:45 PM
> To: dts@dpdk.org
> Cc: Zeng, XiaoxiaoX <xiaoxiaox.zeng@intel.com>
> Subject: [dts] [PATCH V1 0/2]tests/cvl_advanced_rss
> 
> *.add a dictionary to store result logs.
> *.modify rss verify function.
> 
> 
> Zeng Xiaoxiao (2):
>   optimize cvl_advanced_rss code
>   optimize cvl_advanced_rss verify function
> 
>  tests/TestSuite_cvl_advanced_rss.py | 32 +++++++++++++++-------
>  tests/rte_flow_common.py            | 41 +++++++++++++----------------
>  2 files changed, 40 insertions(+), 33 deletions(-)
> 
> --
> 2.17.1


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

* [dts]  [PATCH V1 0/2]tests/cvl_advanced_rss
@ 2020-06-18 14:45 Zeng Xiaoxiao
  2020-06-18  6:12 ` Zeng, XiaoxiaoX
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zeng Xiaoxiao @ 2020-06-18 14:45 UTC (permalink / raw)
  To: dts; +Cc: Zeng Xiaoxiao

*.add a dictionary to store result logs.
*.modify rss verify function. 


Zeng Xiaoxiao (2):
  optimize cvl_advanced_rss code
  optimize cvl_advanced_rss verify function

 tests/TestSuite_cvl_advanced_rss.py | 32 +++++++++++++++-------
 tests/rte_flow_common.py            | 41 +++++++++++++----------------
 2 files changed, 40 insertions(+), 33 deletions(-)

-- 
2.17.1


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

* [dts] [PATCH V1 1/2] optimize cvl_advanced_rss code
  2020-06-18 14:45 [dts] [PATCH V1 0/2]tests/cvl_advanced_rss Zeng Xiaoxiao
  2020-06-18  6:12 ` Zeng, XiaoxiaoX
@ 2020-06-18 14:45 ` Zeng Xiaoxiao
  2020-06-18 14:45 ` [dts] [PATCH V1 2/2] optimize cvl_advanced_rss verify function Zeng Xiaoxiao
  2 siblings, 0 replies; 4+ messages in thread
From: Zeng Xiaoxiao @ 2020-06-18 14:45 UTC (permalink / raw)
  To: dts; +Cc: Zeng Xiaoxiao

Signed-off-by: Zeng Xiaoxiao <xiaoxiaox.zeng@intel.com>
---
 tests/TestSuite_cvl_advanced_rss.py | 32 ++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/tests/TestSuite_cvl_advanced_rss.py b/tests/TestSuite_cvl_advanced_rss.py
index 58c7b02..44c8b23 100644
--- a/tests/TestSuite_cvl_advanced_rss.py
+++ b/tests/TestSuite_cvl_advanced_rss.py
@@ -736,8 +736,8 @@ tv_mac_ipv6_vxlan_icmp_symmetric_toeplitz= {
 tv_mac_ipv4_simple_xor= {
     "name":"tv_mac_ipv4_simple_xor",
     "rte_flow_pattern":"flow create 0 ingress pattern end actions rss func simple_xor key_len 0 queues end / end",
-    "scapy_str": ['Ether()/IP("src="1.1.4.1",dst="2.2.2.3")/("X"*480)',
-                  'Ether()/IP("src="2.2.2.3",dst="1.1.4.1")/("X"*480)'],
+    "scapy_str": ['Ether()/IP(src="1.1.4.1",dst="2.2.2.3")/("X"*480)',
+                  'Ether()/IP(src="2.2.2.3",dst="1.1.4.1")/("X"*480)'],
     "check_func": rfc.check_simplexor_queue,
     "check_func_param": {"expect_port":0}
 }
@@ -856,7 +856,6 @@ class AdvancedRSSTest(TestCase):
 
     def _rte_flow_validate_pattern(self, test_vectors, command, is_vxlan):
 
-        global test_results
         out = self.dut.send_expect(command, "testpmd> ", 120)
         self.logger.debug(out)  #print the log
         self.dut.send_expect("port config 0 rss-hash-key ipv4 1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd", "testpmd> ", 15)
@@ -865,9 +864,10 @@ class AdvancedRSSTest(TestCase):
         self.dut.send_expect("set fwd rxonly", "testpmd> ", 15)
         self.dut.send_expect("set verbose 1", "testpmd> ", 15)
 
-        test_results.clear()
         self.count = 1
-        self.mac_count=100    
+        self.mac_count = 100
+        result_dic = dict()
+        result_flag = 0
         for tv in test_vectors:
             out = self.dut.send_expect(tv["rte_flow_pattern"], "testpmd> ", 15)  #create a rule
             print(out)
@@ -888,14 +888,26 @@ class AdvancedRSSTest(TestCase):
                     print("packet:")
                     print(tv["scapy_str"])
 
-            out = self.dut.send_expect("stop", "testpmd> ",60)
-            print(out)
-            log_msg =  tv["check_func"](out)
-            print(log_msg)
-            rfc.check_rx_tx_packets_match(out, self.mac_count)
+            if "symmetric" or "xor" in tv["name"]:
+                out = self.dut.get_session_output(timeout=3)
+                self.dut.send_expect("stop", "testpmd> ", 60)
+            else:
+                out = self.dut.send_expect("stop", "testpmd> ", 60)
+                result, ret_log = rfc.check_rx_tx_packets_match(out, self.mac_count)
+                self.verify(result is True, ret_log)
+            ret_result, log_msg = tv["check_func"](out)
+            print("%s result is: %s ,%s " % (tv["name"], ret_result, log_msg))
+
+            result_dic[tv["name"]] = ret_result
+
+        print(result_dic)
+
+        if False in result_dic.values():
+            result_flag = 1
 
         self.dut.send_expect("flow flush %d" % self.dut_ports[0], "testpmd> ")
         self.dut.send_expect("quit", "#")
+        self.verify(result_flag == 0, "Some case failed")
 
     def test_advance_rss_ipv4(self):
         command = self.create_testpmd_command()
-- 
2.17.1


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

* [dts] [PATCH V1 2/2] optimize cvl_advanced_rss verify function
  2020-06-18 14:45 [dts] [PATCH V1 0/2]tests/cvl_advanced_rss Zeng Xiaoxiao
  2020-06-18  6:12 ` Zeng, XiaoxiaoX
  2020-06-18 14:45 ` [dts] [PATCH V1 1/2] optimize cvl_advanced_rss code Zeng Xiaoxiao
@ 2020-06-18 14:45 ` Zeng Xiaoxiao
  2 siblings, 0 replies; 4+ messages in thread
From: Zeng Xiaoxiao @ 2020-06-18 14:45 UTC (permalink / raw)
  To: dts; +Cc: Zeng Xiaoxiao

Signed-off-by: Zeng Xiaoxiao <xiaoxiaox.zeng@intel.com>
---
 tests/rte_flow_common.py | 41 ++++++++++++++++++----------------------
 1 file changed, 18 insertions(+), 23 deletions(-)

diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py
index 5a45a7d..0574e49 100644
--- a/tests/rte_flow_common.py
+++ b/tests/rte_flow_common.py
@@ -525,31 +525,26 @@ def check_packets_of_each_queue(out):
     """
     check each queue has receive packets
     """
-    queue_result = re.findall(r"-------(.*)-------\s*(.*)", out)
-    queueid_rxpackets_list = []
-    log_msg = ""
-    for q in queue_result:
-        queue_id =get_queue_id(q[0])
-        rx_packets=get_rxpackets(q[1])
-        if (queue_id != -1):
-            queueid_rxpackets_list.append([queue_id, rx_packets])
-
-    if (len(queueid_rxpackets_list) == 10):
-        if (queueid_rxpackets_list > 0):
-            return True, log_msg
-        else :
-            log_msg = "The queue is rx-packets" % id
-            return False, log_msg
+    out = out.split("Forward statistics for port 0")[0]
+    lines = out.split("\r\n")
+    queue_flag = 0
 
-    p = re.compile("\sForward Stats for RX Port=(.*?)/Queue=(.*?)\s->")
-    li = re.findall(p, out)
-    queue_set = set([int(i[1].strip()) for i in li])
-    verify_set = set(range(64))
-    log_msg = ""
-    if queue_set.issubset(verify_set):
+    for line in lines:
+        line = line.strip()
+        if "Forward Stats" in line.strip():
+            result_scanner = r"RX Port= \d+/Queue=\s?([0-9]+)"
+            scanner = re.compile(result_scanner, re.DOTALL)
+            m = scanner.search(line)
+            queue_num = m.group(1)
+            if queue_num is not None:
+                queue_flag = queue_flag + 1
+
+    if queue_flag != 1:
+        log_msg = "packets goes to %s different queues" % queue_flag
         return True, log_msg
     else:
-        return False, "queue %s out of range %s" % (queue_set, verify_set)
+        log_msg = "packets not goes to different queues"
+        return False, log_msg
 
 def check_symmetric_queue(out):
     """
@@ -634,7 +629,7 @@ def check_iavf_packets_rss_queue(out, count, rss_match=True):
                 packet_sumnum = packet_sumnum + int(packet_num)
 
     if rss_match:
-        if queue_flag >= 10 and packet_sumnum == count:
+        if queue_flag == 16 and packet_sumnum == count:
             log_msg = "Packets has send to %s queues" % queue_flag
             return True, log_msg
         else:
-- 
2.17.1


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

end of thread, other threads:[~2020-06-18  6:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 14:45 [dts] [PATCH V1 0/2]tests/cvl_advanced_rss Zeng Xiaoxiao
2020-06-18  6:12 ` Zeng, XiaoxiaoX
2020-06-18 14:45 ` [dts] [PATCH V1 1/2] optimize cvl_advanced_rss code Zeng Xiaoxiao
2020-06-18 14:45 ` [dts] [PATCH V1 2/2] optimize cvl_advanced_rss verify function Zeng Xiaoxiao

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).