[3/3] tests/TestSuite_dynamic_flowtype:change send pkt mode

Message ID 20201209015944.12586-4-junx.w.zhou@intel.com (mailing list archive)
State Superseded
Headers
Series add new interface for write raw pkt and |

Commit Message

Zhou, JunX W Dec. 9, 2020, 1:59 a.m. UTC
  Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>
---
 tests/TestSuite_dynamic_flowtype.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
  

Patch

diff --git a/tests/TestSuite_dynamic_flowtype.py b/tests/TestSuite_dynamic_flowtype.py
index 99f28d8a..3f47d590 100644
--- a/tests/TestSuite_dynamic_flowtype.py
+++ b/tests/TestSuite_dynamic_flowtype.py
@@ -34,6 +34,7 @@  import re
 import utils
 from test_case import TestCase
 from pmd_output import PmdOutput
+import packet
 
 VM_CORES_MASK = 'all'
 
@@ -202,10 +203,8 @@  class TestDynamicFlowtype(TestCase):
         """
         pkts = self.gtp_packets(flowtype, match_opt)
         for packet_type in list(pkts.keys()):
-            self.tester.scapy_append(
-                'sendp([%s], iface="%s")'
-                % (pkts[packet_type], self.tester_intf))
-            self.tester.scapy_execute()
+            pkt = packet.Packet(pkts[packet_type])
+            pkt.send_pkt(crb=self.tester, tx_port=self.tester_intf)
             out = self.dut.get_session_output(timeout=2)
             if match_opt == 'matched':
                 self.verify("PKT_RX_RSS_HASH" in out,