test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V2 1/5] tests/rte_flow_common:modify check mismatch pkts test
@ 2022-05-24  3:00 Zhimin Huang
  2022-05-24  3:00 ` [dts][PATCH V2 2/5] tests/ice_ip_fragment_rte_flow:extend mismatch pkts Zhimin Huang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Zhimin Huang @ 2022-05-24  3:00 UTC (permalink / raw)
  To: dts; +Cc: Zhimin Huang

For ipfragment test,the mismatch pkt no need to send with fragment.
so modify rte_flow_common to adapt test steps changed.

V2:
fix format issue.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 tests/rte_flow_common.py | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py
index 45446521..25266588 100644
--- a/tests/rte_flow_common.py
+++ b/tests/rte_flow_common.py
@@ -1389,14 +1389,17 @@ class FdirProcessing(object):
         self.verify = self.test_case.verify
         self.ipfrag_flag = ipfrag_flag
 
-    def send_pkt_get_output(self, pkts, port_id=0, count=1, interval=0, drop=False):
+    def send_pkt_get_output(
+        self, pkts, port_id=0, count=1, interval=0, drop=False, **kwargs
+    ):
         tx_port = self.tester_ifaces[0] if port_id == 0 else self.tester_ifaces[1]
         self.logger.info("----------send packet-------------")
         self.logger.info("{}".format(pkts))
+        mismatch_flag = kwargs.get("mismatch")
         if drop:
             self.pmd_output.execute_cmd("clear port stats all")
             time.sleep(1)
-            if self.ipfrag_flag == True:
+            if self.ipfrag_flag == True and not mismatch_flag:
                 send_ipfragment_pkt(self.test_case, pkts, tx_port)
             else:
                 self.pkt.update_pkt(pkts)
@@ -1410,7 +1413,7 @@ class FdirProcessing(object):
             self.pmd_output.execute_cmd("start")
             return out
         else:
-            if self.ipfrag_flag == True:
+            if self.ipfrag_flag == True and not mismatch_flag:
                 count = 2
                 send_ipfragment_pkt(self.test_case, pkts, tx_port)
             else:
@@ -1623,11 +1626,14 @@ class FdirProcessing(object):
 
                 # send and check unmatched packets
                 out2 = self.send_pkt_get_output(
-                    pkts=tv["scapy_str"]["unmatched"], port_id=port_id, drop=drop
+                    pkts=tv["scapy_str"]["unmatched"],
+                    port_id=port_id,
+                    drop=drop,
+                    mismatch=True,
                 )
                 check_mark(
                     out2,
-                    pkt_num=len(tv["scapy_str"]["unmatched"]) * 2
+                    pkt_num=len(tv["scapy_str"]["unmatched"])
                     if self.ipfrag_flag
                     else len(tv["scapy_str"]["unmatched"]),
                     check_param=tv["check_param"],
-- 
2.17.1


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

end of thread, other threads:[~2022-05-24  3:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24  3:00 [dts][PATCH V2 1/5] tests/rte_flow_common:modify check mismatch pkts test Zhimin Huang
2022-05-24  3:00 ` [dts][PATCH V2 2/5] tests/ice_ip_fragment_rte_flow:extend mismatch pkts Zhimin Huang
2022-05-24  3:00 ` [dts][PATCH V2 3/5] test_plans/ice_ip_fragment_rte_flow:extend " Zhimin Huang
2022-05-24  3:00 ` [dts][PATCH V2 4/5] tests/ice_iavf_ip_fragment_rte_flow:extend " Zhimin Huang
2022-05-24  3:00 ` [dts][PATCH V2 5/5] test_plans/ice_iavf_ip_fragment_rte_flow:extend " Zhimin Huang

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