From: Yu Jiang <yux.jiang@intel.com>
To: lijuan.tu@intel.com, dts@dpdk.org
Cc: Yu Jiang <yux.jiang@intel.com>
Subject: [dts][PATCH V2 1/2] tests/hotplug_mp: wait for interface up
Date: Wed, 26 Jan 2022 14:52:38 +0000 [thread overview]
Message-ID: <20220126145239.2274454-2-yux.jiang@intel.com> (raw)
In-Reply-To: <20220126145239.2274454-1-yux.jiang@intel.com>
use new method: is_interface_up to replace redundant code, ensure link up.
Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
tests/TestSuite_hotplug_mp.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_hotplug_mp.py b/tests/TestSuite_hotplug_mp.py
index 11f58d3c..ce7de869 100644
--- a/tests/TestSuite_hotplug_mp.py
+++ b/tests/TestSuite_hotplug_mp.py
@@ -54,7 +54,7 @@ class TestHotplugMp(TestCase):
self.intf0 = self.dut.ports_info[0]['intf']
self.pci0 = self.dut.ports_info[0]['pci']
out = self.dut.build_dpdk_apps("./examples/multi_process/hotplug_mp")
- self.app_path=self.dut.apps_name['hotplug_mp']
+ self.app_path = self.dut.apps_name['hotplug_mp']
self.verify('Error' not in out, "Compilation failed")
# Start one new session to run primary process
self.session_pri = self.dut.new_session()
@@ -221,9 +221,7 @@ class TestHotplugMp(TestCase):
"""
if not iface:
self.dut.send_expect("ifconfig %s up" % self.intf0, "#")
- time.sleep(5)
- out = self.dut.send_expect("ethtool %s" % self.intf0, "#")
- self.verify("Link detected: yes" in out, "Wrong link status")
+ self.verify(self.dut.is_interface_up(intf=self.intf0), "Wrong link status")
self.multi_process_setup()
for i in range(test_loop):
@@ -359,7 +357,7 @@ class TestHotplugMp(TestCase):
"""
vdev = "net_virtio_user0"
self.path = "/home/vhost-net"
- pmd_path=self.dut.apps_name['test-pmd']
+ pmd_path = self.dut.apps_name['test-pmd']
self.session_vhost.send_expect("rm -rf %s" % self.path, "#")
eal_param = self.dut.create_eal_parameters(no_pci=True, prefix='vhost',vdevs=["eth_vhost0,iface=%s" % self.path])
param = ' -- -i'
--
2.25.1
next prev parent reply other threads:[~2022-01-26 6:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 14:52 [dts][PATCH V2 0/2] optimize script: wait for interface/link up Yu Jiang
2022-01-26 14:52 ` Yu Jiang [this message]
2022-01-26 14:52 ` [dts][PATCH V2 2/2] tests/shutdown_api: " Yu Jiang
2022-01-26 7:28 ` Jiale, SongX
2022-01-29 3:15 ` 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=20220126145239.2274454-2-yux.jiang@intel.com \
--to=yux.jiang@intel.com \
--cc=dts@dpdk.org \
--cc=lijuan.tu@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
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).