* [dts] [PATCH V1]tests/TestSuite_hotplug_mp: add two virtio cases in hutplug_mp
@ 2020-04-01 9:06 Xiao Qimai
2020-04-01 9:06 ` Xiao Qimai
2020-04-17 8:58 ` Tu, Lijuan
0 siblings, 2 replies; 5+ messages in thread
From: Xiao Qimai @ 2020-04-01 9:06 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
*. add 2 virtio cases
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
tests/TestSuite_hotplug_mp.py | 78 ++++++++++++++++++++++++++++++++++---------
1 file changed, 62 insertions(+), 16 deletions(-)
diff --git a/tests/TestSuite_hotplug_mp.py b/tests/TestSuite_hotplug_mp.py
index c756ca8..4cb5ce5 100644
--- a/tests/TestSuite_hotplug_mp.py
+++ b/tests/TestSuite_hotplug_mp.py
@@ -8,6 +8,7 @@ Hotplug Multi-process Test.
import utils
import time
from test_case import TestCase
+import itertools
test_loop = 2
@@ -29,6 +30,7 @@ class TestHotplugMp(TestCase):
# Start two new sessions to run secondary process
self.session_sec_1 = self.dut.new_session()
self.session_sec_2 = self.dut.new_session()
+ self.session_vhost = self.dut.new_session()
if self.drivername != "":
self.dut.bind_interfaces_linux(self.kdriver)
@@ -81,7 +83,7 @@ class TestHotplugMp(TestCase):
if flg_exist == 0:
self.verify(dev not in out, "Fail that have the device!")
- def attach_detach(self, process="pri", is_dev=1, opt_plug="plugin", flg_loop=0, dev="0000:00:00.0"):
+ def attach_detach(self, process="pri", is_dev=1, opt_plug="plugin", flg_loop=0, dev="0000:00:00.0", iface=None):
"""
Attach or detach physical/virtual device from primary/secondary
process.
@@ -99,23 +101,33 @@ class TestHotplugMp(TestCase):
dev: define physical device PCI "0000:00:00.0" or virtual device
"net_af_packet"
"""
-
+ iface = self.intf0 if not iface else iface
if opt_plug == "plugin":
self.verify_devlist(dev, flg_exist=0)
for i in range(test_loop):
if process == "pri":
if is_dev == 0:
- self.session_pri.send_expect(
- "attach %s,iface=%s"
- % (dev, self.intf0), "example>", 100)
+ if not 'virtio' in dev:
+ self.session_pri.send_expect(
+ "attach %s,iface=%s"
+ % (dev, iface), "example>", 100)
+ else:
+ self.session_pri.send_expect(
+ "attach %s,%s"
+ % (dev, iface), "example>", 100)
else:
self.session_pri.send_expect(
"attach %s" % dev, "example>", 100)
if process == "sec":
if is_dev == 0:
- self.session_sec_1.send_expect(
- "attach %s,iface=%s"
- % (dev, self.intf0), "example>", 100)
+ if not 'virtio' in dev:
+ self.session_sec_1.send_expect(
+ "attach %s,iface=%s"
+ % (dev, iface), "example>", 100)
+ else:
+ self.session_sec_1.send_expect(
+ "attach %s,%s"
+ % (dev, iface), "example>", 100)
else:
self.session_sec_1.send_expect(
"attach %s" % dev, "example>", 100)
@@ -168,7 +180,7 @@ class TestHotplugMp(TestCase):
self.multi_process_quit()
self.dut.bind_interfaces_linux(self.kdriver)
- def attach_detach_vdev(self, process="pri", opt_plug="plugin", flg_loop=0, dev="net_af_packet"):
+ def attach_detach_vdev(self, process="pri", opt_plug="plugin", flg_loop=0, dev="net_af_packet", iface=None):
"""
Attach or detach virtual device from primary/secondary process.
Check port interface is at link up status before hotplug test.
@@ -176,23 +188,24 @@ class TestHotplugMp(TestCase):
rte_pmd_init_internals(): net_af_packet: ioctl failed (SIOCGIFINDEX)
EAL: Driver cannot attach the device (net_af_packet)
"""
- 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")
+ 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.multi_process_setup()
for i in range(test_loop):
- self.attach_detach(process, 0, "plugin", flg_loop, dev)
+ self.attach_detach(process, 0, "plugin", flg_loop, dev, iface=iface)
if opt_plug in ["plugout", "hotplug", "crossplug"]:
if opt_plug == "crossplug":
if process == "pri":
cross_proc = "sec"
elif process == "sec":
cross_proc = "pri"
- self.attach_detach(cross_proc, 0, "plugout", flg_loop, dev)
+ self.attach_detach(cross_proc, 0, "plugout", flg_loop, dev, iface=iface)
else:
- self.attach_detach(process, 0, "plugout", flg_loop, dev)
+ self.attach_detach(process, 0, "plugout", flg_loop, dev, iface=iface)
if opt_plug == "plugin" or opt_plug == "plugout":
break
@@ -299,6 +312,39 @@ class TestHotplugMp(TestCase):
"""
self.attach_detach_vdev("sec", "crossplug", 1, "net_af_packet")
+ def test_attach_detach_vhost_user(self):
+ """
+ Repeat to attach and detach vhost-user device
+ """
+ vdev = "net_vhost0"
+ self.attach_detach_vdev("pri", "hotplug", 1, vdev, iface="vhost-net,queues=1,client=0")
+ self.attach_detach_vdev("sec", "hotplug", 1, vdev, iface="vhost-net,queues=1,client=0")
+ self.attach_detach_vdev("pri", "crossplug", 1, vdev, iface="vhost-net,queues=1,client=0")
+ self.attach_detach_vdev("sec", "crossplug", 1, vdev, iface="vhost-net,queues=1,client=0")
+
+ def test_attach_detach_virtio_user(self):
+ """
+ Repeat to attach and detach virtio-user device
+ """
+ vdev = "net_virtio_user0"
+ self.path = "/home/vhost-net"
+ 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'
+ testpmd_cmd = "./%s/app/testpmd " % self.target + eal_param + param
+ self.session_vhost.send_expect(testpmd_cmd, 'testpmd> ', timeout=60)
+ try:
+ self.attach_detach_vdev("pri", "hotplug", 1, vdev, iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=0" % self.path)
+ self.attach_detach_vdev("sec", "hotplug", 1, vdev, iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=0" % self.path)
+ self.attach_detach_vdev("pri", "crossplug", 1, vdev, iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=0" % self.path)
+ self.attach_detach_vdev("sec", "crossplug", 1, vdev, iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=0" % self.path)
+ except Exception as e:
+ self.logger.info(e)
+ raise Exception(e)
+ finally:
+ self.dut.send_expect("rm -rf %s" % self.path, "#")
+ self.dut.kill_all()
+
def tear_down(self):
"""
Run after each test case.
--
1.8.3.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [PATCH V1]tests/TestSuite_hotplug_mp: add two virtio cases in hutplug_mp
2020-04-01 9:06 [dts] [PATCH V1]tests/TestSuite_hotplug_mp: add two virtio cases in hutplug_mp Xiao Qimai
@ 2020-04-01 9:06 ` Xiao Qimai
2020-04-01 10:00 ` Xiao, QimaiX
2020-04-17 8:58 ` Tu, Lijuan
1 sibling, 1 reply; 5+ messages in thread
From: Xiao Qimai @ 2020-04-01 9:06 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
*. add 2 virtio cases
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
tests/TestSuite_hotplug_mp.py | 78 ++++++++++++++++++++++++++++++++++---------
1 file changed, 62 insertions(+), 16 deletions(-)
diff --git a/tests/TestSuite_hotplug_mp.py b/tests/TestSuite_hotplug_mp.py
index c756ca8..4cb5ce5 100644
--- a/tests/TestSuite_hotplug_mp.py
+++ b/tests/TestSuite_hotplug_mp.py
@@ -8,6 +8,7 @@ Hotplug Multi-process Test.
import utils
import time
from test_case import TestCase
+import itertools
test_loop = 2
@@ -29,6 +30,7 @@ class TestHotplugMp(TestCase):
# Start two new sessions to run secondary process
self.session_sec_1 = self.dut.new_session()
self.session_sec_2 = self.dut.new_session()
+ self.session_vhost = self.dut.new_session()
if self.drivername != "":
self.dut.bind_interfaces_linux(self.kdriver)
@@ -81,7 +83,7 @@ class TestHotplugMp(TestCase):
if flg_exist == 0:
self.verify(dev not in out, "Fail that have the device!")
- def attach_detach(self, process="pri", is_dev=1, opt_plug="plugin", flg_loop=0, dev="0000:00:00.0"):
+ def attach_detach(self, process="pri", is_dev=1, opt_plug="plugin", flg_loop=0, dev="0000:00:00.0", iface=None):
"""
Attach or detach physical/virtual device from primary/secondary
process.
@@ -99,23 +101,33 @@ class TestHotplugMp(TestCase):
dev: define physical device PCI "0000:00:00.0" or virtual device
"net_af_packet"
"""
-
+ iface = self.intf0 if not iface else iface
if opt_plug == "plugin":
self.verify_devlist(dev, flg_exist=0)
for i in range(test_loop):
if process == "pri":
if is_dev == 0:
- self.session_pri.send_expect(
- "attach %s,iface=%s"
- % (dev, self.intf0), "example>", 100)
+ if not 'virtio' in dev:
+ self.session_pri.send_expect(
+ "attach %s,iface=%s"
+ % (dev, iface), "example>", 100)
+ else:
+ self.session_pri.send_expect(
+ "attach %s,%s"
+ % (dev, iface), "example>", 100)
else:
self.session_pri.send_expect(
"attach %s" % dev, "example>", 100)
if process == "sec":
if is_dev == 0:
- self.session_sec_1.send_expect(
- "attach %s,iface=%s"
- % (dev, self.intf0), "example>", 100)
+ if not 'virtio' in dev:
+ self.session_sec_1.send_expect(
+ "attach %s,iface=%s"
+ % (dev, iface), "example>", 100)
+ else:
+ self.session_sec_1.send_expect(
+ "attach %s,%s"
+ % (dev, iface), "example>", 100)
else:
self.session_sec_1.send_expect(
"attach %s" % dev, "example>", 100)
@@ -168,7 +180,7 @@ class TestHotplugMp(TestCase):
self.multi_process_quit()
self.dut.bind_interfaces_linux(self.kdriver)
- def attach_detach_vdev(self, process="pri", opt_plug="plugin", flg_loop=0, dev="net_af_packet"):
+ def attach_detach_vdev(self, process="pri", opt_plug="plugin", flg_loop=0, dev="net_af_packet", iface=None):
"""
Attach or detach virtual device from primary/secondary process.
Check port interface is at link up status before hotplug test.
@@ -176,23 +188,24 @@ class TestHotplugMp(TestCase):
rte_pmd_init_internals(): net_af_packet: ioctl failed (SIOCGIFINDEX)
EAL: Driver cannot attach the device (net_af_packet)
"""
- 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")
+ 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.multi_process_setup()
for i in range(test_loop):
- self.attach_detach(process, 0, "plugin", flg_loop, dev)
+ self.attach_detach(process, 0, "plugin", flg_loop, dev, iface=iface)
if opt_plug in ["plugout", "hotplug", "crossplug"]:
if opt_plug == "crossplug":
if process == "pri":
cross_proc = "sec"
elif process == "sec":
cross_proc = "pri"
- self.attach_detach(cross_proc, 0, "plugout", flg_loop, dev)
+ self.attach_detach(cross_proc, 0, "plugout", flg_loop, dev, iface=iface)
else:
- self.attach_detach(process, 0, "plugout", flg_loop, dev)
+ self.attach_detach(process, 0, "plugout", flg_loop, dev, iface=iface)
if opt_plug == "plugin" or opt_plug == "plugout":
break
@@ -299,6 +312,39 @@ class TestHotplugMp(TestCase):
"""
self.attach_detach_vdev("sec", "crossplug", 1, "net_af_packet")
+ def test_attach_detach_vhost_user(self):
+ """
+ Repeat to attach and detach vhost-user device
+ """
+ vdev = "net_vhost0"
+ self.attach_detach_vdev("pri", "hotplug", 1, vdev, iface="vhost-net,queues=1,client=0")
+ self.attach_detach_vdev("sec", "hotplug", 1, vdev, iface="vhost-net,queues=1,client=0")
+ self.attach_detach_vdev("pri", "crossplug", 1, vdev, iface="vhost-net,queues=1,client=0")
+ self.attach_detach_vdev("sec", "crossplug", 1, vdev, iface="vhost-net,queues=1,client=0")
+
+ def test_attach_detach_virtio_user(self):
+ """
+ Repeat to attach and detach virtio-user device
+ """
+ vdev = "net_virtio_user0"
+ self.path = "/home/vhost-net"
+ 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'
+ testpmd_cmd = "./%s/app/testpmd " % self.target + eal_param + param
+ self.session_vhost.send_expect(testpmd_cmd, 'testpmd> ', timeout=60)
+ try:
+ self.attach_detach_vdev("pri", "hotplug", 1, vdev, iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=0" % self.path)
+ self.attach_detach_vdev("sec", "hotplug", 1, vdev, iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=0" % self.path)
+ self.attach_detach_vdev("pri", "crossplug", 1, vdev, iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=0" % self.path)
+ self.attach_detach_vdev("sec", "crossplug", 1, vdev, iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=0" % self.path)
+ except Exception as e:
+ self.logger.info(e)
+ raise Exception(e)
+ finally:
+ self.dut.send_expect("rm -rf %s" % self.path, "#")
+ self.dut.kill_all()
+
def tear_down(self):
"""
Run after each test case.
--
1.8.3.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1]tests/TestSuite_hotplug_mp: add two virtio cases in hutplug_mp
2020-04-01 9:06 ` Xiao Qimai
@ 2020-04-01 10:00 ` Xiao, QimaiX
2020-04-02 8:41 ` Wang, Yinan
0 siblings, 1 reply; 5+ messages in thread
From: Xiao, QimaiX @ 2020-04-01 10:00 UTC (permalink / raw)
To: dts
[-- Attachment #1: Type: text/plain, Size: 8644 bytes --]
Tested-by: : Xiao, QimaiX <qimaix.xiao@intel.com>
Regards,
Xiao Qimai
> -----Original Message-----
> From: Xiao, QimaiX
> Sent: Wednesday, April 1, 2020 5:07 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts][PATCH V1]tests/TestSuite_hotplug_mp: add two virtio cases in
> hutplug_mp
>
> *. add 2 virtio cases
>
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
> tests/TestSuite_hotplug_mp.py | 78
> ++++++++++++++++++++++++++++++++++---------
> 1 file changed, 62 insertions(+), 16 deletions(-)
>
> diff --git a/tests/TestSuite_hotplug_mp.py
> b/tests/TestSuite_hotplug_mp.py index c756ca8..4cb5ce5 100644
> --- a/tests/TestSuite_hotplug_mp.py
> +++ b/tests/TestSuite_hotplug_mp.py
> @@ -8,6 +8,7 @@ Hotplug Multi-process Test.
> import utils
> import time
> from test_case import TestCase
> +import itertools
>
> test_loop = 2
>
> @@ -29,6 +30,7 @@ class TestHotplugMp(TestCase):
> # Start two new sessions to run secondary process
> self.session_sec_1 = self.dut.new_session()
> self.session_sec_2 = self.dut.new_session()
> + self.session_vhost = self.dut.new_session()
> if self.drivername != "":
> self.dut.bind_interfaces_linux(self.kdriver)
>
> @@ -81,7 +83,7 @@ class TestHotplugMp(TestCase):
> if flg_exist == 0:
> self.verify(dev not in out, "Fail that have the device!")
>
> - def attach_detach(self, process="pri", is_dev=1, opt_plug="plugin",
> flg_loop=0, dev="0000:00:00.0"):
> + def attach_detach(self, process="pri", is_dev=1, opt_plug="plugin",
> flg_loop=0, dev="0000:00:00.0", iface=None):
> """
> Attach or detach physical/virtual device from primary/secondary
> process.
> @@ -99,23 +101,33 @@ class TestHotplugMp(TestCase):
> dev: define physical device PCI "0000:00:00.0" or virtual device
> "net_af_packet"
> """
> -
> + iface = self.intf0 if not iface else iface
> if opt_plug == "plugin":
> self.verify_devlist(dev, flg_exist=0)
> for i in range(test_loop):
> if process == "pri":
> if is_dev == 0:
> - self.session_pri.send_expect(
> - "attach %s,iface=%s"
> - % (dev, self.intf0), "example>", 100)
> + if not 'virtio' in dev:
> + self.session_pri.send_expect(
> + "attach %s,iface=%s"
> + % (dev, iface), "example>", 100)
> + else:
> + self.session_pri.send_expect(
> + "attach %s,%s"
> + % (dev, iface), "example>", 100)
> else:
> self.session_pri.send_expect(
> "attach %s" % dev, "example>", 100)
> if process == "sec":
> if is_dev == 0:
> - self.session_sec_1.send_expect(
> - "attach %s,iface=%s"
> - % (dev, self.intf0), "example>", 100)
> + if not 'virtio' in dev:
> + self.session_sec_1.send_expect(
> + "attach %s,iface=%s"
> + % (dev, iface), "example>", 100)
> + else:
> + self.session_sec_1.send_expect(
> + "attach %s,%s"
> + % (dev, iface), "example>", 100)
> else:
> self.session_sec_1.send_expect(
> "attach %s" % dev, "example>", 100) @@ -168,7 +180,7 @@
> class TestHotplugMp(TestCase):
> self.multi_process_quit()
> self.dut.bind_interfaces_linux(self.kdriver)
>
> - def attach_detach_vdev(self, process="pri", opt_plug="plugin",
> flg_loop=0, dev="net_af_packet"):
> + def attach_detach_vdev(self, process="pri", opt_plug="plugin",
> flg_loop=0, dev="net_af_packet", iface=None):
> """
> Attach or detach virtual device from primary/secondary process.
> Check port interface is at link up status before hotplug test.
> @@ -176,23 +188,24 @@ class TestHotplugMp(TestCase):
> rte_pmd_init_internals(): net_af_packet: ioctl failed (SIOCGIFINDEX)
> EAL: Driver cannot attach the device (net_af_packet)
> """
> - 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")
> + 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.multi_process_setup()
> for i in range(test_loop):
> - self.attach_detach(process, 0, "plugin", flg_loop, dev)
> + self.attach_detach(process, 0, "plugin", flg_loop, dev,
> + iface=iface)
> if opt_plug in ["plugout", "hotplug", "crossplug"]:
> if opt_plug == "crossplug":
> if process == "pri":
> cross_proc = "sec"
> elif process == "sec":
> cross_proc = "pri"
> - self.attach_detach(cross_proc, 0, "plugout", flg_loop, dev)
> + self.attach_detach(cross_proc, 0, "plugout",
> + flg_loop, dev, iface=iface)
> else:
> - self.attach_detach(process, 0, "plugout", flg_loop, dev)
> + self.attach_detach(process, 0, "plugout", flg_loop,
> + dev, iface=iface)
>
> if opt_plug == "plugin" or opt_plug == "plugout":
> break
> @@ -299,6 +312,39 @@ class TestHotplugMp(TestCase):
> """
> self.attach_detach_vdev("sec", "crossplug", 1, "net_af_packet")
>
> + def test_attach_detach_vhost_user(self):
> + """
> + Repeat to attach and detach vhost-user device
> + """
> + vdev = "net_vhost0"
> + self.attach_detach_vdev("pri", "hotplug", 1, vdev, iface="vhost-
> net,queues=1,client=0")
> + self.attach_detach_vdev("sec", "hotplug", 1, vdev, iface="vhost-
> net,queues=1,client=0")
> + self.attach_detach_vdev("pri", "crossplug", 1, vdev, iface="vhost-
> net,queues=1,client=0")
> + self.attach_detach_vdev("sec", "crossplug", 1, vdev,
> + iface="vhost-net,queues=1,client=0")
> +
> + def test_attach_detach_virtio_user(self):
> + """
> + Repeat to attach and detach virtio-user device
> + """
> + vdev = "net_virtio_user0"
> + self.path = "/home/vhost-net"
> + 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'
> + testpmd_cmd = "./%s/app/testpmd " % self.target + eal_param +
> param
> + self.session_vhost.send_expect(testpmd_cmd, 'testpmd> ',
> timeout=60)
> + try:
> + self.attach_detach_vdev("pri", "hotplug", 1, vdev,
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order
> =0" % self.path)
> + self.attach_detach_vdev("sec", "hotplug", 1, vdev,
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order
> =0" % self.path)
> + self.attach_detach_vdev("pri", "crossplug", 1, vdev,
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order
> =0" % self.path)
> + self.attach_detach_vdev("sec", "crossplug", 1, vdev,
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order
> =0" % self.path)
> + except Exception as e:
> + self.logger.info(e)
> + raise Exception(e)
> + finally:
> + self.dut.send_expect("rm -rf %s" % self.path, "#")
> + self.dut.kill_all()
> +
> def tear_down(self):
> """
> Run after each test case.
> --
> 1.8.3.1
[-- Attachment #2: TestHotplugMp.log --]
[-- Type: application/octet-stream, Size: 22357 bytes --]
01/04/2020 15:43:10 dts:
TEST SUITE : TestHotplugMp
01/04/2020 15:43:10 dts: NIC : fortville_spirit
01/04/2020 15:43:10 dut.10.240.183.61:
01/04/2020 15:43:10 tester:
01/04/2020 15:43:10 dut.10.240.183.61: rm -rf ./app/test/test_resource_c.res.o
01/04/2020 15:43:10 dut.10.240.183.61:
01/04/2020 15:43:10 dut.10.240.183.61: rm -rf ./app/test/test_resource_tar.res.o
01/04/2020 15:43:10 dut.10.240.183.61:
01/04/2020 15:43:10 dut.10.240.183.61: rm -rf ./app/test/test_pci_sysfs.res.o
01/04/2020 15:43:10 dut.10.240.183.61:
01/04/2020 15:43:10 dut.10.240.183.61: make -j 70 -C ./examples/multi_process/
01/04/2020 15:43:11 dut.10.240.183.61: make: Entering directory '/root/dpdk/examples/multi_process'
== client_server_mp
== simple_mp
== symmetric_mp
== hotplug_mp
== mp_server
== mp_client
make: Leaving directory '/root/dpdk/examples/multi_process'
01/04/2020 15:43:19 dut.10.240.183.61: ls
01/04/2020 15:43:19 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:43:19 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=i40e 0000:af:00.0
01/04/2020 15:43:19 dut.10.240.183.61:
01/04/2020 15:43:19 TestHotplugMp: Test Case test_attach_detach_dev_primary_cross_loop Begin
01/04/2020 15:43:20 dut.10.240.183.61:
01/04/2020 15:43:20 tester:
01/04/2020 15:43:20 dut.10.240.183.61: ls
01/04/2020 15:43:20 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:43:20 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=igb_uio 0000:af:00.0
01/04/2020 15:43:22 dut.10.240.183.61:
01/04/2020 15:43:30 dut.10.240.183.61: ls
01/04/2020 15:43:31 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:43:31 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=i40e 0000:af:00.0
01/04/2020 15:43:31 dut.10.240.183.61:
01/04/2020 15:43:31 TestHotplugMp: Test Case test_attach_detach_dev_primary_cross_loop Result PASSED:
01/04/2020 15:43:31 TestHotplugMp: Test Case test_attach_detach_dev_primary_loop Begin
01/04/2020 15:43:31 dut.10.240.183.61:
01/04/2020 15:43:32 tester:
01/04/2020 15:43:32 dut.10.240.183.61: ls
01/04/2020 15:43:32 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:43:32 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=igb_uio 0000:af:00.0
01/04/2020 15:43:34 dut.10.240.183.61:
01/04/2020 15:43:42 dut.10.240.183.61: ls
01/04/2020 15:43:42 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:43:42 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=i40e 0000:af:00.0
01/04/2020 15:43:43 dut.10.240.183.61:
01/04/2020 15:43:43 TestHotplugMp: Test Case test_attach_detach_dev_primary_loop Result PASSED:
01/04/2020 15:43:43 TestHotplugMp: Test Case test_attach_detach_dev_secondary_cross_loop Begin
01/04/2020 15:43:43 dut.10.240.183.61:
01/04/2020 15:43:43 tester:
01/04/2020 15:43:44 dut.10.240.183.61: ls
01/04/2020 15:43:44 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:43:44 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=igb_uio 0000:af:00.0
01/04/2020 15:43:46 dut.10.240.183.61:
01/04/2020 15:43:54 dut.10.240.183.61: ls
01/04/2020 15:43:54 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:43:54 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=i40e 0000:af:00.0
01/04/2020 15:43:55 dut.10.240.183.61:
01/04/2020 15:43:55 TestHotplugMp: Test Case test_attach_detach_dev_secondary_cross_loop Result PASSED:
01/04/2020 15:43:55 TestHotplugMp: Test Case test_attach_detach_dev_secondary_loop Begin
01/04/2020 15:43:55 dut.10.240.183.61:
01/04/2020 15:43:55 tester:
01/04/2020 15:43:56 dut.10.240.183.61: ls
01/04/2020 15:43:56 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:43:56 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=igb_uio 0000:af:00.0
01/04/2020 15:43:58 dut.10.240.183.61:
01/04/2020 15:44:06 dut.10.240.183.61: ls
01/04/2020 15:44:06 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:44:06 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=i40e 0000:af:00.0
01/04/2020 15:44:07 dut.10.240.183.61:
01/04/2020 15:44:07 TestHotplugMp: Test Case test_attach_detach_dev_secondary_loop Result PASSED:
01/04/2020 15:44:07 TestHotplugMp: Test Case test_attach_detach_vdev_primary_cross_loop Begin
01/04/2020 15:44:07 dut.10.240.183.61:
01/04/2020 15:44:07 tester:
01/04/2020 15:44:07 dut.10.240.183.61: ifconfig enp175s0f0 up
01/04/2020 15:44:07 dut.10.240.183.61:
01/04/2020 15:44:12 dut.10.240.183.61: ethtool enp175s0f0
01/04/2020 15:44:12 dut.10.240.183.61: Settings for enp175s0f0:
Supported ports: [ FIBRE ]
Supported link modes: 40000baseCR4/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 40000baseCR4/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 40000Mb/s
Duplex: Full
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x0000000f (15)
drv probe link timer
Link detected: yes
01/04/2020 15:44:15 TestHotplugMp: Test Case test_attach_detach_vdev_primary_cross_loop Result PASSED:
01/04/2020 15:44:15 TestHotplugMp: Test Case test_attach_detach_vdev_primary_loop Begin
01/04/2020 15:44:15 dut.10.240.183.61:
01/04/2020 15:44:16 tester:
01/04/2020 15:44:16 dut.10.240.183.61: ifconfig enp175s0f0 up
01/04/2020 15:44:16 dut.10.240.183.61:
01/04/2020 15:44:21 dut.10.240.183.61: ethtool enp175s0f0
01/04/2020 15:44:21 dut.10.240.183.61: Settings for enp175s0f0:
Supported ports: [ FIBRE ]
Supported link modes: 40000baseCR4/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 40000baseCR4/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 40000Mb/s
Duplex: Full
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x0000000f (15)
drv probe link timer
Link detected: yes
01/04/2020 15:44:24 TestHotplugMp: Test Case test_attach_detach_vdev_primary_loop Result PASSED:
01/04/2020 15:44:24 TestHotplugMp: Test Case test_attach_detach_vdev_secondary_cross_loop Begin
01/04/2020 15:44:24 dut.10.240.183.61:
01/04/2020 15:44:24 tester:
01/04/2020 15:44:24 dut.10.240.183.61: ifconfig enp175s0f0 up
01/04/2020 15:44:24 dut.10.240.183.61:
01/04/2020 15:44:29 dut.10.240.183.61: ethtool enp175s0f0
01/04/2020 15:44:29 dut.10.240.183.61: Settings for enp175s0f0:
Supported ports: [ FIBRE ]
Supported link modes: 40000baseCR4/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 40000baseCR4/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 40000Mb/s
Duplex: Full
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x0000000f (15)
drv probe link timer
Link detected: yes
01/04/2020 15:44:32 TestHotplugMp: Test Case test_attach_detach_vdev_secondary_cross_loop Result PASSED:
01/04/2020 15:44:32 TestHotplugMp: Test Case test_attach_detach_vdev_secondary_loop Begin
01/04/2020 15:44:32 dut.10.240.183.61:
01/04/2020 15:44:32 tester:
01/04/2020 15:44:32 dut.10.240.183.61: ifconfig enp175s0f0 up
01/04/2020 15:44:32 dut.10.240.183.61:
01/04/2020 15:44:37 dut.10.240.183.61: ethtool enp175s0f0
01/04/2020 15:44:38 dut.10.240.183.61: Settings for enp175s0f0:
Supported ports: [ FIBRE ]
Supported link modes: 40000baseCR4/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 40000baseCR4/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 40000Mb/s
Duplex: Full
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x0000000f (15)
drv probe link timer
Link detected: yes
01/04/2020 15:44:41 TestHotplugMp: Test Case test_attach_detach_vdev_secondary_loop Result PASSED:
01/04/2020 15:44:41 TestHotplugMp: Test Case test_attach_detach_vhost_user Begin
01/04/2020 15:44:41 dut.10.240.183.61:
01/04/2020 15:44:41 tester:
01/04/2020 15:44:52 TestHotplugMp: Test Case test_attach_detach_vhost_user Result PASSED:
01/04/2020 15:44:52 TestHotplugMp: Test Case test_attach_detach_virtio_user Begin
01/04/2020 15:44:52 dut.10.240.183.61:
01/04/2020 15:44:53 tester:
01/04/2020 15:45:05 dut.10.240.183.61: rm -rf /home/vhost-net
01/04/2020 15:45:05 dut.10.240.183.61:
01/04/2020 15:45:05 dut.10.240.183.61: kill_all: called by dut and prefix list has value.
01/04/2020 15:45:07 dut.10.240.183.61:
01/04/2020 15:45:07 TestHotplugMp: Test Case test_attach_detach_virtio_user Result PASSED:
01/04/2020 15:45:07 TestHotplugMp: Test Case test_attach_dev_primary Begin
01/04/2020 15:45:07 dut.10.240.183.61:
01/04/2020 15:45:07 tester:
01/04/2020 15:45:08 dut.10.240.183.61: ls
01/04/2020 15:45:08 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:45:08 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=igb_uio 0000:af:00.0
01/04/2020 15:45:10 dut.10.240.183.61:
01/04/2020 15:45:14 dut.10.240.183.61: ls
01/04/2020 15:45:14 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:45:14 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=i40e 0000:af:00.0
01/04/2020 15:45:15 dut.10.240.183.61:
01/04/2020 15:45:15 TestHotplugMp: Test Case test_attach_dev_primary Result PASSED:
01/04/2020 15:45:15 TestHotplugMp: Test Case test_attach_dev_secondary Begin
01/04/2020 15:45:15 dut.10.240.183.61:
01/04/2020 15:45:15 tester:
01/04/2020 15:45:16 dut.10.240.183.61: ls
01/04/2020 15:45:16 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:45:16 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=igb_uio 0000:af:00.0
01/04/2020 15:45:18 dut.10.240.183.61:
01/04/2020 15:45:22 dut.10.240.183.61: ls
01/04/2020 15:45:22 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:45:22 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=i40e 0000:af:00.0
01/04/2020 15:45:23 dut.10.240.183.61:
01/04/2020 15:45:23 TestHotplugMp: Test Case test_attach_dev_secondary Result PASSED:
01/04/2020 15:45:23 TestHotplugMp: Test Case test_attach_vdev_primary Begin
01/04/2020 15:45:23 dut.10.240.183.61:
01/04/2020 15:45:23 tester:
01/04/2020 15:45:23 dut.10.240.183.61: ifconfig enp175s0f0 up
01/04/2020 15:45:23 dut.10.240.183.61:
01/04/2020 15:45:28 dut.10.240.183.61: ethtool enp175s0f0
01/04/2020 15:45:28 dut.10.240.183.61: Settings for enp175s0f0:
Supported ports: [ FIBRE ]
Supported link modes: 40000baseCR4/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 40000baseCR4/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 40000Mb/s
Duplex: Full
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x0000000f (15)
drv probe link timer
Link detected: yes
01/04/2020 15:45:30 TestHotplugMp: Test Case test_attach_vdev_primary Result PASSED:
01/04/2020 15:45:30 TestHotplugMp: Test Case test_attach_vdev_secondary Begin
01/04/2020 15:45:30 dut.10.240.183.61:
01/04/2020 15:45:30 tester:
01/04/2020 15:45:30 dut.10.240.183.61: ifconfig enp175s0f0 up
01/04/2020 15:45:30 dut.10.240.183.61:
01/04/2020 15:45:35 dut.10.240.183.61: ethtool enp175s0f0
01/04/2020 15:45:35 dut.10.240.183.61: Settings for enp175s0f0:
Supported ports: [ FIBRE ]
Supported link modes: 40000baseCR4/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 40000baseCR4/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 40000Mb/s
Duplex: Full
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x0000000f (15)
drv probe link timer
Link detected: yes
01/04/2020 15:45:36 TestHotplugMp: Test Case test_attach_vdev_secondary Result PASSED:
01/04/2020 15:45:36 TestHotplugMp: Test Case test_detach_dev_primary Begin
01/04/2020 15:45:36 dut.10.240.183.61:
01/04/2020 15:45:36 tester:
01/04/2020 15:45:36 dut.10.240.183.61: ls
01/04/2020 15:45:37 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:45:37 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=igb_uio 0000:af:00.0
01/04/2020 15:45:38 dut.10.240.183.61:
01/04/2020 15:45:44 dut.10.240.183.61: ls
01/04/2020 15:45:44 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:45:44 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=i40e 0000:af:00.0
01/04/2020 15:45:45 dut.10.240.183.61:
01/04/2020 15:45:45 TestHotplugMp: Test Case test_detach_dev_primary Result PASSED:
01/04/2020 15:45:45 TestHotplugMp: Test Case test_detach_dev_secondary Begin
01/04/2020 15:45:45 dut.10.240.183.61:
01/04/2020 15:45:45 tester:
01/04/2020 15:45:45 dut.10.240.183.61: ls
01/04/2020 15:45:45 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:45:45 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=igb_uio 0000:af:00.0
01/04/2020 15:45:47 dut.10.240.183.61:
01/04/2020 15:45:53 dut.10.240.183.61: ls
01/04/2020 15:45:53 dut.10.240.183.61: ABI_VERSION app buildtools config devtools doc drivers examples GNUmakefile kernel lib license MAINTAINERS Makefile meson.build meson_options.txt mk README usertools VERSION x86_64-native-linuxapp-gcc
01/04/2020 15:45:53 dut.10.240.183.61: usertools/dpdk-devbind.py --force --bind=i40e 0000:af:00.0
01/04/2020 15:45:54 dut.10.240.183.61:
01/04/2020 15:45:54 TestHotplugMp: Test Case test_detach_dev_secondary Result PASSED:
01/04/2020 15:45:54 TestHotplugMp: Test Case test_detach_vdev_primary Begin
01/04/2020 15:45:54 dut.10.240.183.61:
01/04/2020 15:45:54 tester:
01/04/2020 15:45:54 dut.10.240.183.61: ifconfig enp175s0f0 up
01/04/2020 15:45:54 dut.10.240.183.61:
01/04/2020 15:45:59 dut.10.240.183.61: ethtool enp175s0f0
01/04/2020 15:45:59 dut.10.240.183.61: Settings for enp175s0f0:
Supported ports: [ FIBRE ]
Supported link modes: 40000baseCR4/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 40000baseCR4/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 40000Mb/s
Duplex: Full
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x0000000f (15)
drv probe link timer
Link detected: yes
01/04/2020 15:46:01 TestHotplugMp: Test Case test_detach_vdev_primary Result PASSED:
01/04/2020 15:46:01 TestHotplugMp: Test Case test_detach_vdev_secondary Begin
01/04/2020 15:46:01 dut.10.240.183.61:
01/04/2020 15:46:01 tester:
01/04/2020 15:46:01 dut.10.240.183.61: ifconfig enp175s0f0 up
01/04/2020 15:46:01 dut.10.240.183.61:
01/04/2020 15:46:06 dut.10.240.183.61: ethtool enp175s0f0
01/04/2020 15:46:06 dut.10.240.183.61: Settings for enp175s0f0:
Supported ports: [ FIBRE ]
Supported link modes: 40000baseCR4/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 40000baseCR4/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 40000Mb/s
Duplex: Full
Port: Direct Attach Copper
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x0000000f (15)
drv probe link timer
Link detected: yes
01/04/2020 15:46:08 TestHotplugMp: Test Case test_detach_vdev_secondary Result PASSED:
01/04/2020 15:46:08 dts:
TEST SUITE ENDED: TestHotplugMp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1]tests/TestSuite_hotplug_mp: add two virtio cases in hutplug_mp
2020-04-01 10:00 ` Xiao, QimaiX
@ 2020-04-02 8:41 ` Wang, Yinan
0 siblings, 0 replies; 5+ messages in thread
From: Wang, Yinan @ 2020-04-02 8:41 UTC (permalink / raw)
To: Xiao, QimaiX, dts
Acked-by: Wang, Yinan <yinan.wang@intel.com>
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xiao, QimaiX
> Sent: 2020年4月1日 18:00
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1]tests/TestSuite_hotplug_mp: add two virtio
> cases in hutplug_mp
>
> Tested-by: : Xiao, QimaiX <qimaix.xiao@intel.com>
>
> Regards,
> Xiao Qimai
>
>
> > -----Original Message-----
> > From: Xiao, QimaiX
> > Sent: Wednesday, April 1, 2020 5:07 PM
> > To: dts@dpdk.org
> > Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> > Subject: [dts][PATCH V1]tests/TestSuite_hotplug_mp: add two virtio
> > cases in hutplug_mp
> >
> > *. add 2 virtio cases
> >
> > Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> > ---
> > tests/TestSuite_hotplug_mp.py | 78
> > ++++++++++++++++++++++++++++++++++---------
> > 1 file changed, 62 insertions(+), 16 deletions(-)
> >
> > diff --git a/tests/TestSuite_hotplug_mp.py
> > b/tests/TestSuite_hotplug_mp.py index c756ca8..4cb5ce5 100644
> > --- a/tests/TestSuite_hotplug_mp.py
> > +++ b/tests/TestSuite_hotplug_mp.py
> > @@ -8,6 +8,7 @@ Hotplug Multi-process Test.
> > import utils
> > import time
> > from test_case import TestCase
> > +import itertools
> >
> > test_loop = 2
> >
> > @@ -29,6 +30,7 @@ class TestHotplugMp(TestCase):
> > # Start two new sessions to run secondary process
> > self.session_sec_1 = self.dut.new_session()
> > self.session_sec_2 = self.dut.new_session()
> > + self.session_vhost = self.dut.new_session()
> > if self.drivername != "":
> > self.dut.bind_interfaces_linux(self.kdriver)
> >
> > @@ -81,7 +83,7 @@ class TestHotplugMp(TestCase):
> > if flg_exist == 0:
> > self.verify(dev not in out, "Fail that have the
> > device!")
> >
> > - def attach_detach(self, process="pri", is_dev=1, opt_plug="plugin",
> > flg_loop=0, dev="0000:00:00.0"):
> > + def attach_detach(self, process="pri", is_dev=1,
> > + opt_plug="plugin",
> > flg_loop=0, dev="0000:00:00.0", iface=None):
> > """
> > Attach or detach physical/virtual device from primary/secondary
> > process.
> > @@ -99,23 +101,33 @@ class TestHotplugMp(TestCase):
> > dev: define physical device PCI "0000:00:00.0" or virtual device
> > "net_af_packet"
> > """
> > -
> > + iface = self.intf0 if not iface else iface
> > if opt_plug == "plugin":
> > self.verify_devlist(dev, flg_exist=0)
> > for i in range(test_loop):
> > if process == "pri":
> > if is_dev == 0:
> > - self.session_pri.send_expect(
> > - "attach %s,iface=%s"
> > - % (dev, self.intf0), "example>", 100)
> > + if not 'virtio' in dev:
> > + self.session_pri.send_expect(
> > + "attach %s,iface=%s"
> > + % (dev, iface), "example>", 100)
> > + else:
> > + self.session_pri.send_expect(
> > + "attach %s,%s"
> > + % (dev, iface), "example>", 100)
> > else:
> > self.session_pri.send_expect(
> > "attach %s" % dev, "example>", 100)
> > if process == "sec":
> > if is_dev == 0:
> > - self.session_sec_1.send_expect(
> > - "attach %s,iface=%s"
> > - % (dev, self.intf0), "example>", 100)
> > + if not 'virtio' in dev:
> > + self.session_sec_1.send_expect(
> > + "attach %s,iface=%s"
> > + % (dev, iface), "example>", 100)
> > + else:
> > + self.session_sec_1.send_expect(
> > + "attach %s,%s"
> > + % (dev, iface), "example>", 100)
> > else:
> > self.session_sec_1.send_expect(
> > "attach %s" % dev, "example>", 100) @@
> > -168,7 +180,7 @@ class TestHotplugMp(TestCase):
> > self.multi_process_quit()
> > self.dut.bind_interfaces_linux(self.kdriver)
> >
> > - def attach_detach_vdev(self, process="pri", opt_plug="plugin",
> > flg_loop=0, dev="net_af_packet"):
> > + def attach_detach_vdev(self, process="pri", opt_plug="plugin",
> > flg_loop=0, dev="net_af_packet", iface=None):
> > """
> > Attach or detach virtual device from primary/secondary process.
> > Check port interface is at link up status before hotplug test.
> > @@ -176,23 +188,24 @@ class TestHotplugMp(TestCase):
> > rte_pmd_init_internals(): net_af_packet: ioctl failed (SIOCGIFINDEX)
> > EAL: Driver cannot attach the device (net_af_packet)
> > """
> > - 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")
> > + 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.multi_process_setup()
> > for i in range(test_loop):
> > - self.attach_detach(process, 0, "plugin", flg_loop, dev)
> > + self.attach_detach(process, 0, "plugin", flg_loop, dev,
> > + iface=iface)
> > if opt_plug in ["plugout", "hotplug", "crossplug"]:
> > if opt_plug == "crossplug":
> > if process == "pri":
> > cross_proc = "sec"
> > elif process == "sec":
> > cross_proc = "pri"
> > - self.attach_detach(cross_proc, 0, "plugout", flg_loop, dev)
> > + self.attach_detach(cross_proc, 0, "plugout",
> > + flg_loop, dev, iface=iface)
> > else:
> > - self.attach_detach(process, 0, "plugout", flg_loop, dev)
> > + self.attach_detach(process, 0, "plugout",
> > + flg_loop, dev, iface=iface)
> >
> > if opt_plug == "plugin" or opt_plug == "plugout":
> > break
> > @@ -299,6 +312,39 @@ class TestHotplugMp(TestCase):
> > """
> > self.attach_detach_vdev("sec", "crossplug", 1,
> > "net_af_packet")
> >
> > + def test_attach_detach_vhost_user(self):
> > + """
> > + Repeat to attach and detach vhost-user device
> > + """
> > + vdev = "net_vhost0"
> > + self.attach_detach_vdev("pri", "hotplug", 1, vdev,
> > + iface="vhost-
> > net,queues=1,client=0")
> > + self.attach_detach_vdev("sec", "hotplug", 1, vdev,
> > + iface="vhost-
> > net,queues=1,client=0")
> > + self.attach_detach_vdev("pri", "crossplug", 1, vdev,
> > + iface="vhost-
> > net,queues=1,client=0")
> > + self.attach_detach_vdev("sec", "crossplug", 1, vdev,
> > + iface="vhost-net,queues=1,client=0")
> > +
> > + def test_attach_detach_virtio_user(self):
> > + """
> > + Repeat to attach and detach virtio-user device
> > + """
> > + vdev = "net_virtio_user0"
> > + self.path = "/home/vhost-net"
> > + 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'
> > + testpmd_cmd = "./%s/app/testpmd " % self.target + eal_param +
> > param
> > + self.session_vhost.send_expect(testpmd_cmd, 'testpmd> ',
> > timeout=60)
> > + try:
> > + self.attach_detach_vdev("pri", "hotplug", 1, vdev,
> >
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order
> > =0" % self.path)
> > + self.attach_detach_vdev("sec", "hotplug", 1, vdev,
> >
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order
> > =0" % self.path)
> > + self.attach_detach_vdev("pri", "crossplug", 1, vdev,
> >
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order
> > =0" % self.path)
> > + self.attach_detach_vdev("sec", "crossplug", 1, vdev,
> >
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order
> > =0" % self.path)
> > + except Exception as e:
> > + self.logger.info(e)
> > + raise Exception(e)
> > + finally:
> > + self.dut.send_expect("rm -rf %s" % self.path, "#")
> > + self.dut.kill_all()
> > +
> > def tear_down(self):
> > """
> > Run after each test case.
> > --
> > 1.8.3.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1]tests/TestSuite_hotplug_mp: add two virtio cases in hutplug_mp
2020-04-01 9:06 [dts] [PATCH V1]tests/TestSuite_hotplug_mp: add two virtio cases in hutplug_mp Xiao Qimai
2020-04-01 9:06 ` Xiao Qimai
@ 2020-04-17 8:58 ` Tu, Lijuan
1 sibling, 0 replies; 5+ messages in thread
From: Tu, Lijuan @ 2020-04-17 8:58 UTC (permalink / raw)
To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> Sent: Wednesday, April 1, 2020 5:07 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1]tests/TestSuite_hotplug_mp: add two virtio cases in
> hutplug_mp
>
> *. add 2 virtio cases
>
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
> tests/TestSuite_hotplug_mp.py | 78
> ++++++++++++++++++++++++++++++++++---------
> 1 file changed, 62 insertions(+), 16 deletions(-)
>
> diff --git a/tests/TestSuite_hotplug_mp.py b/tests/TestSuite_hotplug_mp.py
> index c756ca8..4cb5ce5 100644
> --- a/tests/TestSuite_hotplug_mp.py
> +++ b/tests/TestSuite_hotplug_mp.py
> @@ -8,6 +8,7 @@ Hotplug Multi-process Test.
> import utils
> import time
> from test_case import TestCase
> +import itertools
>
> test_loop = 2
>
> @@ -29,6 +30,7 @@ class TestHotplugMp(TestCase):
> # Start two new sessions to run secondary process
> self.session_sec_1 = self.dut.new_session()
> self.session_sec_2 = self.dut.new_session()
> + self.session_vhost = self.dut.new_session()
> if self.drivername != "":
> self.dut.bind_interfaces_linux(self.kdriver)
>
> @@ -81,7 +83,7 @@ class TestHotplugMp(TestCase):
> if flg_exist == 0:
> self.verify(dev not in out, "Fail that have the device!")
>
> - def attach_detach(self, process="pri", is_dev=1, opt_plug="plugin",
> flg_loop=0, dev="0000:00:00.0"):
> + def attach_detach(self, process="pri", is_dev=1, opt_plug="plugin",
> flg_loop=0, dev="0000:00:00.0", iface=None):
> """
> Attach or detach physical/virtual device from primary/secondary
> process.
> @@ -99,23 +101,33 @@ class TestHotplugMp(TestCase):
> dev: define physical device PCI "0000:00:00.0" or virtual device
> "net_af_packet"
> """
> -
> + iface = self.intf0 if not iface else iface
> if opt_plug == "plugin":
> self.verify_devlist(dev, flg_exist=0)
> for i in range(test_loop):
> if process == "pri":
> if is_dev == 0:
> - self.session_pri.send_expect(
> - "attach %s,iface=%s"
> - % (dev, self.intf0), "example>", 100)
> + if not 'virtio' in dev:
> + self.session_pri.send_expect(
> + "attach %s,iface=%s"
> + % (dev, iface), "example>", 100)
> + else:
> + self.session_pri.send_expect(
> + "attach %s,%s"
> + % (dev, iface), "example>", 100)
> else:
> self.session_pri.send_expect(
> "attach %s" % dev, "example>", 100)
> if process == "sec":
> if is_dev == 0:
> - self.session_sec_1.send_expect(
> - "attach %s,iface=%s"
> - % (dev, self.intf0), "example>", 100)
> + if not 'virtio' in dev:
> + self.session_sec_1.send_expect(
> + "attach %s,iface=%s"
> + % (dev, iface), "example>", 100)
> + else:
> + self.session_sec_1.send_expect(
> + "attach %s,%s"
> + % (dev, iface), "example>", 100)
> else:
> self.session_sec_1.send_expect(
> "attach %s" % dev, "example>", 100) @@ -168,7 +180,7 @@
> class TestHotplugMp(TestCase):
> self.multi_process_quit()
> self.dut.bind_interfaces_linux(self.kdriver)
>
> - def attach_detach_vdev(self, process="pri", opt_plug="plugin", flg_loop=0,
> dev="net_af_packet"):
> + def attach_detach_vdev(self, process="pri", opt_plug="plugin",
> flg_loop=0, dev="net_af_packet", iface=None):
> """
> Attach or detach virtual device from primary/secondary process.
> Check port interface is at link up status before hotplug test.
> @@ -176,23 +188,24 @@ class TestHotplugMp(TestCase):
> rte_pmd_init_internals(): net_af_packet: ioctl failed (SIOCGIFINDEX)
> EAL: Driver cannot attach the device (net_af_packet)
> """
> - 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")
> + 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.multi_process_setup()
> for i in range(test_loop):
> - self.attach_detach(process, 0, "plugin", flg_loop, dev)
> + self.attach_detach(process, 0, "plugin", flg_loop, dev,
> + iface=iface)
> if opt_plug in ["plugout", "hotplug", "crossplug"]:
> if opt_plug == "crossplug":
> if process == "pri":
> cross_proc = "sec"
> elif process == "sec":
> cross_proc = "pri"
> - self.attach_detach(cross_proc, 0, "plugout", flg_loop, dev)
> + self.attach_detach(cross_proc, 0, "plugout",
> + flg_loop, dev, iface=iface)
> else:
> - self.attach_detach(process, 0, "plugout", flg_loop, dev)
> + self.attach_detach(process, 0, "plugout", flg_loop,
> + dev, iface=iface)
>
> if opt_plug == "plugin" or opt_plug == "plugout":
> break
> @@ -299,6 +312,39 @@ class TestHotplugMp(TestCase):
> """
> self.attach_detach_vdev("sec", "crossplug", 1, "net_af_packet")
>
> + def test_attach_detach_vhost_user(self):
> + """
> + Repeat to attach and detach vhost-user device
> + """
> + vdev = "net_vhost0"
> + self.attach_detach_vdev("pri", "hotplug", 1, vdev, iface="vhost-
> net,queues=1,client=0")
> + self.attach_detach_vdev("sec", "hotplug", 1, vdev, iface="vhost-
> net,queues=1,client=0")
> + self.attach_detach_vdev("pri", "crossplug", 1, vdev, iface="vhost-
> net,queues=1,client=0")
> + self.attach_detach_vdev("sec", "crossplug", 1, vdev,
> + iface="vhost-net,queues=1,client=0")
> +
> + def test_attach_detach_virtio_user(self):
> + """
> + Repeat to attach and detach virtio-user device
> + """
> + vdev = "net_virtio_user0"
> + self.path = "/home/vhost-net"
> + 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'
> + testpmd_cmd = "./%s/app/testpmd " % self.target + eal_param +
> param
> + self.session_vhost.send_expect(testpmd_cmd, 'testpmd> ', timeout=60)
> + try:
> + self.attach_detach_vdev("pri", "hotplug", 1, vdev,
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=
> 0" % self.path)
> + self.attach_detach_vdev("sec", "hotplug", 1, vdev,
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=
> 0" % self.path)
> + self.attach_detach_vdev("pri", "crossplug", 1, vdev,
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=
> 0" % self.path)
> + self.attach_detach_vdev("sec", "crossplug", 1, vdev,
> iface="mac=00:01:02:03:04:05,path=%s,packed_vq=1,mrg_rxbuf=1,in_order=
> 0" % self.path)
> + except Exception as e:
> + self.logger.info(e)
> + raise Exception(e)
> + finally:
> + self.dut.send_expect("rm -rf %s" % self.path, "#")
> + self.dut.kill_all()
> +
> def tear_down(self):
> """
> Run after each test case.
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-17 8:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 9:06 [dts] [PATCH V1]tests/TestSuite_hotplug_mp: add two virtio cases in hutplug_mp Xiao Qimai
2020-04-01 9:06 ` Xiao Qimai
2020-04-01 10:00 ` Xiao, QimaiX
2020-04-02 8:41 ` Wang, Yinan
2020-04-17 8:58 ` 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).