From: xizhan4x <xix.zhang@intel.com>
To: dts@dpdk.org
Cc: xizhan4x <xix.zhang@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_cbdma:Modify the start IOAT path
Date: Thu, 17 Sep 2020 14:09:17 +0800 [thread overview]
Message-ID: <1600322957-32663-1-git-send-email-xix.zhang@intel.com> (raw)
Modify the start IOAT path supoort meson build
Signed-off-by: xizhan4x <xix.zhang@intel.com>
---
tests/TestSuite_cbdma.py | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_cbdma.py b/tests/TestSuite_cbdma.py
index d7ca3ae..14611f0 100644
--- a/tests/TestSuite_cbdma.py
+++ b/tests/TestSuite_cbdma.py
@@ -54,7 +54,8 @@ class TestCBDMA(TestCase):
self.verify(len(self.dut_ports) >= 2, "Insufficient ports for testing")
self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
self.get_cbdma_ports_info_and_bind_to_dpdk()
- out = self.dut.build_dpdk_apps('./examples/ioat/')
+ out = self.dut.build_dpdk_apps('./examples/ioat')
+ self.app_path=self.dut.apps_name['ioat']
self.verify('Error' not in out, 'compilation ioat error')
def set_up(self):
@@ -139,14 +140,17 @@ class TestCBDMA(TestCase):
num is 2
'''
# flush other output
- self.dut.get_session_output(timeout=1)
- cmd_command = './examples/ioat/build/ioatfwd ' + eal_params + \
+ self.send_session=self.dut.new_session("new_session")
+ target = self.app_path.split("/")
+ self.send_session.send_expect(f"cd {'/'.join(target[0:-1])} ", '# ')
+ self.send_session.get_session_before(timeout=1)
+ cmd_command = "./"+target[-1] + eal_params + \
'-- -p %s -q %d %s -c %s' % (hex(port_info),
self.cbdma_ioat_dev_num/self.cbdma_nic_dev_num, mac_info,
self.cbdma_copy_mode)
- self.dut.send_expect(cmd_command, 'ioatfwd,')
+ self.send_session.send_expect(cmd_command, f'{target[-1].strip()},')
time.sleep(1)
- out = self.dut.get_session_output(timeout=1)
+ out = self.send_session.get_session_before(timeout=1)
thread_num = 2 if self.cbdma_cores_num > 2 else 1
o_thread_info = 'Worker Threads = %d' % thread_num
o_copy_info = 'Copy Mode = %s' % self.cbdma_copy_mode
@@ -210,7 +214,7 @@ class TestCBDMA(TestCase):
"""
Check stats of ioat app, each ioat channel can enqueue packets
"""
- out = self.dut.get_session_output(timeout=2)
+ out = self.send_session.get_session_before(timeout=2)
index = out.rfind('Statistics for port 0')
out = out[index:]
data_info = re.findall('successful_enqueues:\s*(\d*)', out)
--
1.8.3.1
next reply other threads:[~2020-09-17 6:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 6:09 xizhan4x [this message]
2020-09-17 6:14 ` Zhang, XiX
2020-09-22 5:41 ` Wang, Yinan
2020-09-23 7:31 ` Tu, Lijuan
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=1600322957-32663-1-git-send-email-xix.zhang@intel.com \
--to=xix.zhang@intel.com \
--cc=dts@dpdk.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).