test suite reviews and discussions
 help / color / mirror / Atom feed
From: yufengmx <yufengx.mo@intel.com>
To: dts@dpdk.org, yinan.wang@intel.com
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V1 1/1] ntb: update script
Date: Mon,  8 Feb 2021 15:06:56 +0800
Message-ID: <20210208070656.3148-2-yufengx.mo@intel.com> (raw)
In-Reply-To: <20210208070656.3148-1-yufengx.mo@intel.com>


#. fix missing name ntb_fwd in conf/app_name.cfg
#. fix flow content failed to save all layers into pcap file
#. update ntb prompttrex

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 tests/TestSuite_ntb.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_ntb.py b/tests/TestSuite_ntb.py
index 34dda6a0..e5013132 100644
--- a/tests/TestSuite_ntb.py
+++ b/tests/TestSuite_ntb.py
@@ -136,16 +136,16 @@ class TestNtb(TestCase):
         cmd_opt = " ".join(["{}={}".format(key, param[key]) for key in param.keys()])
 
         self.get_core_list()
-        app = self.dut.apps_name['ntb_fwd']
+        app = self.dut.apps_name['ntb']
         eal_host = self.ntb_host.create_eal_parameters(cores=self.host_core_list)
         eal_client = self.ntb_client.create_eal_parameters(cores=self.client_core_list)
         host_cmd_line = ' '.join([app, eal_host, cmd_opt])
         client_cmd_line = ' '.join([app, eal_client, cmd_opt])
         self.ntb_host.send_expect(host_cmd_line, 'Checking ntb link status', 30)
-        self.ntb_client.send_expect(client_cmd_line, 'Checking ntb link status', 30)
+        self.ntb_client.send_expect(client_cmd_line, 'ntb>', 30)
         time.sleep(3)
-        self.ntb_host.send_expect(" ", 'ntb> ', 10)
-        self.ntb_client.send_expect(" ", 'ntb> ', 10)
+        #self.ntb_host.send_expect(" ", 'ntb> ', 10)
+        #self.ntb_client.send_expect(" ", 'ntb> ', 10)
 
     def start_ntb_fwd_on_dut(self, crb, fwd_mode='io'):
         crb.send_expect('set fwd %s' % fwd_mode, 'ntb> ', 30)
@@ -156,11 +156,12 @@ class TestNtb(TestCase):
         tgen_input = []
 
         for i, each_mac in enumerate([self.host_mac, self.client_mac]):
-            flow = 'Ether(dst="%s")/IP(dst="192.168.%d.1", proto=255)/UDP()/("X"*%d)' % (each_mac, i, payload)
-            pkt = Packet(pkt_str=flow)
+            flow = 'Ether(dst="%s")/IP(dst="192.168.%d.1", proto=255)/UDP()/Raw(b"%s")' % (each_mac, i, "X"*payload)
             pcap = os.path.join(self.out_path, "ntb_%d_%d.pcap" %
                     (i, frame_size))
-            pkt.save_pcapfile(None, pcap)
+            self.tester.scapy_append("flow=" + flow)
+            self.tester.scapy_append("wrpcap('%s', flow)" % pcap)
+            self.tester.scapy_execute()
             tgen_input.append((i, (i+1)%2, pcap))
 
         return tgen_input
-- 
2.21.0


  reply	other threads:[~2021-02-08  7:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08  7:06 [dts] [PATCH V1 0/1] " yufengmx
2021-02-08  7:06 ` yufengmx [this message]
2021-02-19  7:52   ` [dts] [PATCH V1 1/1] " Tu, Lijuan
2021-02-08  7:37 ` [dts] [PATCH V1 0/1] " Wang, Yinan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210208070656.3148-2-yufengx.mo@intel.com \
    --to=yufengx.mo@intel.com \
    --cc=dts@dpdk.org \
    --cc=yinan.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ https://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git