[dts] [PATCH V2 3/3][nsh] tests/uni_pkt: update code

Ma, LihongX lihongx.ma at intel.com
Wed Oct 16 03:59:58 CEST 2019


Tested-by:ma,lihong<lihongx.ma at intel.com>

-----Original Message-----
From: Ma, LihongX 
Sent: Tuesday, October 15, 2019 5:49 AM
To: dts at dpdk.org
Cc: Ma, LihongX <lihongx.ma at intel.com>
Subject: [dts][PATCH V2 3/3][nsh] tests/uni_pkt: update code

Signed-off-by: lihong <lihongx.ma at intel.com>
---
 tests/TestSuite_uni_pkt.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py index 0310e04..e6bd42b 100644
--- a/tests/TestSuite_uni_pkt.py
+++ b/tests/TestSuite_uni_pkt.py
@@ -444,9 +444,8 @@ class TestUniPacket(TestCase):
                              }
 
         for packet in nsh_packets:
-            self.tester.scapy_foreground()
-            self.tester.scapy_append("sendp([%s],iface='%s')" % (nsh_packets[packet], self.tester_iface))
-            self.tester.scapy_execute()
+            pk=Packet(nsh_packets[packet])
+            pk.send_pkt(self.tester, self.tester_iface)
             out = self.dut.get_session_output(timeout=2)
             self.verify(nsh_detect_message[packet] in out, "Packet Detection Error for : %s" % packet)
             print utils.GREEN("Detected packet %s Successfully" % packet)
--
2.7.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestUniPacket.log
Type: application/octet-stream
Size: 327354 bytes
Desc: TestUniPacket.log
URL: <http://mails.dpdk.org/archives/dts/attachments/20191016/d8e19d61/attachment.obj>


More information about the dts mailing list