test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] fix sedcmd to ensure if sentence has process_pkts included
@ 2019-06-04  9:02 xiao,qimai
  2019-06-05  5:28 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: xiao,qimai @ 2019-06-04  9:02 UTC (permalink / raw)
  To: dts; +Cc: xiao,qimai

due to no indents in C program, add {} to make sure if sentence include
function process_pkts

Signed-off-by: xiao,qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_inline_ipsec.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_inline_ipsec.py b/tests/TestSuite_inline_ipsec.py
index d67bcce..57552c2 100644
--- a/tests/TestSuite_inline_ipsec.py
+++ b/tests/TestSuite_inline_ipsec.py
@@ -86,7 +86,7 @@ class TestInlineIpsec(TestCase):
 
         self.path = "./examples/ipsec-secgw/build/ipsec-secgw"
         # add print code in IPSEC app
-        sedcmd = r"""sed -i -e '/process_pkts(qconf, pkts, nb_rx, portid);/i\\t\t\t\tprintf("[debug]receive %hhu packet in rxqueueid=%hhu\\n",nb_rx, queueid);' examples/ipsec-secgw/ipsec-secgw.c"""
+        sedcmd = r"""sed -i -e 's/if (nb_rx > 0)/if (nb_rx > 0) {/g' -e '/\/\* dequeue and process completed crypto-ops \*\//i\\t\t\t}' -e '/process_pkts(qconf, pkts, nb_rx, portid);/i\\t\t\t\tprintf("[debug]receive %hhu packet in rxqueueid=%hhu\\n",nb_rx, queueid);' examples/ipsec-secgw/ipsec-secgw.c"""
         self.dut.send_expect(sedcmd, "#", 60)
 
         # build sample app
@@ -216,6 +216,7 @@ class TestInlineIpsec(TestCase):
         sa_gcm = r"sa_gcm=SecurityAssociation(ESP,spi=%s,crypt_algo='AES-GCM',crypt_key='\x2b\x7e\x15\x16\x28\xae\xd2\xa6\xab\xf7\x15\x88\x09\xcf\x4f\x3d\xde\xad\xbe\xef',auth_algo='NULL',auth_key=None,tunnel_header=IP(src='172.16.1.5',dst='172.16.2.5'))" % receive_spi
 
         session_receive.send_expect("scapy", ">>>", 10)
+        time.sleep(1)
         session_receive.send_expect(
             "pkts=sniff(iface='%s',count=1,timeout=45)" % rxItf, "", 10)
 
-- 
2.17.1


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

end of thread, other threads:[~2019-06-05  5:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04  9:02 [dts] [PATCH V1] fix sedcmd to ensure if sentence has process_pkts included xiao,qimai
2019-06-05  5:28 ` Tu, Lijuan

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