* [dts] [PATCH V1 02/15] tests/loopback_virtio_user_server_mode:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 03/15] tests/loopback_multi_queues:Change " zhu,shuai
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
.../TestSuite_loopback_virtio_user_server_mode.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/tests/TestSuite_loopback_virtio_user_server_mode.py b/tests/TestSuite_loopback_virtio_user_server_mode.py
index fd4b807..08278df 100644
--- a/tests/TestSuite_loopback_virtio_user_server_mode.py
+++ b/tests/TestSuite_loopback_virtio_user_server_mode.py
@@ -59,13 +59,14 @@ class TestLoopbackVirtioUserServerMode(TestCase):
self.core_list_host = self.core_list[3:6]
self.core_mask_user = utils.create_mask(self.core_list_user)
self.core_mask_host = utils.create_mask(self.core_list_host)
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
Run before each test case.
"""
# Clean the execution ENV
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.dut.send_expect("killall -s INT testpmd", "#")
# Prepare the result table
self.table_header = ["Mode", "Pkt_size", "Throughput(Mpps)",
@@ -82,10 +83,10 @@ class TestLoopbackVirtioUserServerMode(TestCase):
command_client = self.dut.target + "/app/testpmd " + \
" -n %d -c %s --socket-mem 1024,1024 " + \
" --legacy-mem --no-pci --file-prefix=vhost " + \
- " --vdev 'net_vhost0,iface=vhost-net,client=1,queues=%d' " + \
+ " --vdev 'net_vhost0,iface=%s/vhost-net,client=1,queues=%d' " + \
" -- -i --rxq=%d --txq=%d --nb-cores=%d %s"
command_line_client = command_client % (self.dut.get_memory_channels(),
- self.core_mask_host, queue_number, queue_number,
+ self.core_mask_host, self.base_dir, queue_number, queue_number,
queue_number, nb_cores, extern_params)
self.vhost.send_expect(command_line_client, "testpmd> ", 120)
self.vhost.send_expect("set fwd mac", "testpmd> ", 120)
@@ -96,10 +97,10 @@ class TestLoopbackVirtioUserServerMode(TestCase):
"""
command_line_user = self.dut.target + "/app/testpmd -n %d -c %s --socket-mem 1024,1024 " + \
"--legacy-mem --no-pci --file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=vhost-net,server=1,queues=1 " + \
+ "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=%s/vhost-net,server=1,queues=1 " + \
" -- -i --rxq=1 --txq=1 --no-numa"
command_line_user = command_line_user % (self.dut.get_memory_channels(),
- self.core_mask_user)
+ self.core_mask_user, self.base_dir)
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
@@ -115,10 +116,10 @@ class TestLoopbackVirtioUserServerMode(TestCase):
"""
command_line_user = self.dut.target + "/app/testpmd -n %d -c %s --socket-mem 1024,1024 " + \
"--legacy-mem --no-pci --file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=vhost-net,server=1,queues=%d,%s " + \
+ "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=%s/vhost-net,server=1,queues=%d,%s " + \
" -- -i %s --nb-cores=%d --rxq=%d --txq=%d"
command_line_user = command_line_user % (self.dut.get_memory_channels(),
- self.core_mask_user, self.queue_number, mode, extern_params,
+ self.core_mask_user, self.base_dir, self.queue_number, mode, extern_params,
self.nb_cores, self.queue_number, self.queue_number)
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 03/15] tests/loopback_multi_queues:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 02/15] tests/loopback_virtio_user_server_mode:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 04/15] tests/loopback_multi_paths_port_restart:Change " zhu,shuai
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_loopback_multi_queues.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_loopback_multi_queues.py b/tests/TestSuite_loopback_multi_queues.py
index b6c3d25..51f9226 100644
--- a/tests/TestSuite_loopback_multi_queues.py
+++ b/tests/TestSuite_loopback_multi_queues.py
@@ -62,13 +62,14 @@ class TestLoopbackMultiQueues(TestCase):
self.socket_mem = '1024'
else:
self.socket_mem = '1024,1024'
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
Run before each test case.
"""
# Prepare the result table
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.dut.send_expect("killall -s INT testpmd", "#")
self.table_header = ["Frame", "Mode", "Throughput(Mpps)", "Queue Number"]
self.result_table_create(self.table_header)
@@ -97,10 +98,10 @@ class TestLoopbackMultiQueues(TestCase):
"""
command_line_client = self.dut.target + "/app/testpmd -n %d -c %s --socket-mem %s" + \
" --legacy-mem --no-pci --file-prefix=vhost --vdev " + \
- "'net_vhost0,iface=vhost-net,queues=%d' -- -i --nb-cores=%d " + \
+ "'net_vhost0,iface=%s/vhost-net,queues=%d' -- -i --nb-cores=%d " + \
"--rxq=%d --txq=%d --txd=1024 --rxd=1024"
command_line_client = command_line_client % (
- self.dut.get_memory_channels(), self.core_mask_host, self.socket_mem,
+ self.dut.get_memory_channels(), self.core_mask_host, self.socket_mem, self.base_dir,
self.queue_number, self.nb_cores, self.queue_number, self.queue_number)
self.vhost.send_expect(command_line_client, "testpmd> ", 120)
self.vhost.send_expect("set fwd mac", "testpmd> ", 120)
@@ -111,10 +112,10 @@ class TestLoopbackMultiQueues(TestCase):
"""
command_line_user = self.dut.target + "/app/testpmd -n %d -c %s " + \
" --socket-mem %s --legacy-mem --no-pci --file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,queues=%d,%s " + \
+ "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=%s/vhost-net,queues=%d,%s " + \
"-- -i %s --rss-ip --nb-cores=%d --rxq=%d --txq=%d --txd=1024 --rxd=1024"
command_line_user = command_line_user % (
- self.dut.get_memory_channels(), self.core_mask_user, self.socket_mem,
+ self.dut.get_memory_channels(), self.core_mask_user, self.socket_mem, self.base_dir,
self.queue_number, args["version"], args["path"], self.nb_cores,
self.queue_number, self.queue_number)
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 04/15] tests/loopback_multi_paths_port_restart:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 02/15] tests/loopback_virtio_user_server_mode:Change " zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 03/15] tests/loopback_multi_queues:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 05/15] tests/vhost_enqueue_interrupt:Change " zhu,shuai
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_loopback_multi_paths_port_restart.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_loopback_multi_paths_port_restart.py b/tests/TestSuite_loopback_multi_paths_port_restart.py
index b1bd32f..b5b1a69 100644
--- a/tests/TestSuite_loopback_multi_paths_port_restart.py
+++ b/tests/TestSuite_loopback_multi_paths_port_restart.py
@@ -59,6 +59,7 @@ class TestLoopbackPortRestart(TestCase):
self.core_list_host = self.core_list[2:5]
self.core_mask_user = utils.create_mask(self.core_list_user)
self.core_mask_host = utils.create_mask(self.core_list_host)
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
@@ -80,14 +81,14 @@ class TestLoopbackPortRestart(TestCase):
start testpmd on vhost
"""
self.dut.send_expect("killall -s INT testpmd", "#")
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
command_client = self.dut.target + "/app/testpmd " + \
" -n %d -c %s --socket-mem 1024,1024 " + \
" --legacy-mem --no-pci --file-prefix=vhost " + \
- " --vdev 'net_vhost0,iface=vhost-net,queues=1,client=0' " + \
+ " --vdev 'net_vhost0,iface=%s/vhost-net,queues=1,client=0' " + \
" -- -i --nb-cores=1 --txd=1024 --rxd=1024"
command_line_client = command_client % (
- self.dut.get_memory_channels(), self.core_mask_host)
+ self.dut.get_memory_channels(), self.core_mask_host, self.base_dir)
self.vhost.send_expect(command_line_client, "testpmd> ", 120)
self.vhost.send_expect("set fwd mac", "testpmd> ", 120)
@@ -97,10 +98,10 @@ class TestLoopbackPortRestart(TestCase):
"""
command_line_user = self.dut.target + "/app/testpmd -n %d -c %s --socket-mem 1024,1024 " + \
"--legacy-mem --no-pci --file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,%s " + \
+ "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=%s/vhost-net,%s " + \
" -- -i %s --rss-ip --nb-cores=1 --txd=1024 --rxd=1024"
command_line_user = command_line_user % (self.dut.get_memory_channels(),
- self.core_mask_user,
+ self.core_mask_user, self.base_dir,
pmd_arg["version"], pmd_arg["path"])
self.virtio_user.send_expect(command_line_user, "testpmd> ", 120)
self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120)
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 05/15] tests/vhost_enqueue_interrupt:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (2 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 04/15] tests/loopback_multi_paths_port_restart:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 06/15] tests/vhost_virtio_user_interrupt:Change " zhu,shuai
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_vhost_enqueue_interrupt.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_vhost_enqueue_interrupt.py b/tests/TestSuite_vhost_enqueue_interrupt.py
index 428cf36..09805b8 100644
--- a/tests/TestSuite_vhost_enqueue_interrupt.py
+++ b/tests/TestSuite_vhost_enqueue_interrupt.py
@@ -52,6 +52,7 @@ class TestVhostEnqueueInterrupt(TestCase):
self.dut_ports = self.dut.get_ports()
self.mem_channels = self.dut.get_memory_channels()
self.prepare_l3fwd_power()
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
@@ -61,7 +62,7 @@ class TestVhostEnqueueInterrupt(TestCase):
self.verify_info = []
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT l3fwd-power", "#")
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.vhost = self.dut.new_session(suite="vhost-l3fwd")
self.virtio_user = self.dut.new_session(suite="virtio-user")
@@ -93,11 +94,11 @@ class TestVhostEnqueueInterrupt(TestCase):
command_client = self.dut.target + "/app/testpmd -c %s -n %d " + \
"--socket-mem 1024,1024 --legacy-mem --no-pci " + \
"--file-prefix=virtio " + \
- "--vdev=net_virtio_user0,mac=%s,path=./vhost-net,server=1,queues=%d " + \
+ "--vdev=net_virtio_user0,mac=%s,path=%s/vhost-net,server=1,queues=%d " + \
"-- -i --rxq=%d --txq=%d --rss-ip"
command_line_client = command_client % (
self.core_mask_virtio, self.mem_channels,
- self.vmac, self.queues, self.queues, self.queues)
+ self.vmac, self.base_dir, self.queues, self.queues, self.queues)
self.virtio_user.send_expect(command_line_client, "testpmd> ", 120)
self.virtio_user.send_expect("set fwd txonly", "testpmd> ", 20)
@@ -117,10 +118,10 @@ class TestVhostEnqueueInterrupt(TestCase):
command_client = "./examples/l3fwd-power/build/app/l3fwd-power " + \
"-c %s -n %d --socket-mem 1024,1024 --legacy-mem --no-pci " + \
- "--vdev 'net_vhost0,iface=vhost-net,queues=%d,client=1' " + \
+ "--vdev 'net_vhost0,iface=%s/vhost-net,queues=%d,client=1' " + \
"-- -p 0x1 --parse-ptype 1 --config '%s' "
command_line_client = command_client % (
- self.core_mask_l3fwd, self.mem_channels,
+ self.core_mask_l3fwd, self.mem_channels, self.base_dir,
self.queues, config_info)
self.vhost.get_session_before(timeout=2)
self.vhost.send_expect(command_line_client, "POWER", 40)
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 06/15] tests/vhost_virtio_user_interrupt:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (3 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 05/15] tests/vhost_enqueue_interrupt:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 07/15] tests/vhost_event_idx_interrupt:Change " zhu,shuai
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_vhost_virtio_user_interrupt.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py b/tests/TestSuite_vhost_virtio_user_interrupt.py
index 5422e04..e4048ca 100644
--- a/tests/TestSuite_vhost_virtio_user_interrupt.py
+++ b/tests/TestSuite_vhost_virtio_user_interrupt.py
@@ -62,6 +62,7 @@ class TestVirtioUserInterrupt(TestCase):
self.prepare_l3fwd_power()
self.tx_port = self.tester.get_local_port(self.dut_ports[0])
self.tx_interface = self.tester.get_interface(self.tx_port)
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
@@ -69,7 +70,7 @@ class TestVirtioUserInterrupt(TestCase):
"""
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT l3fwd-power", "#")
- self.dut.send_expect("rm -rf vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.l3fwd = self.dut.new_session(suite="l3fwd")
self.vhost = self.dut.new_session(suite="vhost")
@@ -115,10 +116,10 @@ class TestVirtioUserInterrupt(TestCase):
cmd_vhost_user = self.dut.target + "/app/testpmd -n %d -c %s " + \
"--socket-mem 1024,1024 --legacy-mem %s " + \
"--file-prefix=vhost " + \
- "--vdev 'net_vhost0,iface=vhost-net,queues=1,client=0' " + \
+ "--vdev 'net_vhost0,iface=%s/vhost-net,queues=1,client=0' " + \
"-- -i --rxq=1 --txq=1"
cmd_vhost_user = cmd_vhost_user % (self.mem_channel,
- self.core_mask_vhost, pci)
+ self.core_mask_vhost, pci, self.base_dir)
self.vhost.send_expect(cmd_vhost_user, "testpmd>", 30)
self.vhost.send_expect("set fwd mac", "testpmd>", 30)
@@ -131,10 +132,10 @@ class TestVirtioUserInterrupt(TestCase):
cmd_virtio_user = self.dut.target + "/app/testpmd -n %d -c %s " + \
" --socket-mem 1024,1024 --legacy-mem --no-pci " + \
"--file-prefix=virtio " + \
- " --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net" + \
+ " --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=%s/vhost-net" + \
" -- -i --txd=512 --rxd=128 --tx-offloads=0x00"
cmd_virtio_user = cmd_virtio_user % (self.mem_channel,
- self.core_mask_virtio)
+ self.core_mask_virtio, self.base_dir)
self.virtio.send_expect(cmd_virtio_user, "testpmd>", 120)
self.virtio.send_expect("set fwd mac", "testpmd>", 20)
@@ -185,7 +186,7 @@ class TestVirtioUserInterrupt(TestCase):
Check the virtio-user interrupt can work when use vhost-user as backend
"""
self.start_vhost_testpmd(pci="")
- self.launch_l3fwd(path="./vhost-net")
+ self.launch_l3fwd(path="%s/vhost-net" % self.base_dir)
# double check the status of interrupt core
for i in range(2):
self.tester.scapy_append('pk=[Ether(dst="52:54:00:00:00:01")/IP()/("X"*64)]')
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 07/15] tests/vhost_event_idx_interrupt:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (4 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 06/15] tests/vhost_virtio_user_interrupt:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 08/15] tests/vm2vm_virtio_pmd:Change " zhu,shuai
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_vhost_event_idx_interrupt.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_vhost_event_idx_interrupt.py b/tests/TestSuite_vhost_event_idx_interrupt.py
index 2d0bc38..b691ca3 100644
--- a/tests/TestSuite_vhost_event_idx_interrupt.py
+++ b/tests/TestSuite_vhost_event_idx_interrupt.py
@@ -52,6 +52,7 @@ class TestVhostEventIdxInterrupt(TestCase):
self.queues = 1
self.cores_num = len([n for n in self.dut.cores if int(n['socket']) == 0])
self.prepare_l3fwd_power()
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
@@ -61,7 +62,7 @@ class TestVhostEventIdxInterrupt(TestCase):
self.verify_info = []
self.dut.send_expect("killall -s INT l3fwd-power", "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.vhost = self.dut.new_session(suite="vhost-l3fwd")
self.vm_dut = []
self.vm = []
@@ -101,7 +102,7 @@ class TestVhostEventIdxInterrupt(TestCase):
# config the vdev info, if have 2 vms, it shoule have 2 vdev info
vdev_info = ""
for i in range(self.vm_num):
- vdev_info += "--vdev 'net_vhost%d,iface=vhost-net%d,queues=%d,client=1' " % (i, i, self.queues)
+ vdev_info += "--vdev 'net_vhost%d,iface=%s/vhost-net%d,queues=%d,client=1' " % (i, self.base_dir, i, self.queues)
port_info = "0x1" if self.vm_num == 1 else "0x3"
@@ -167,7 +168,7 @@ class TestVhostEventIdxInterrupt(TestCase):
vm_info.load_config()
vm_params = {}
vm_params['driver'] = 'vhost-user'
- vm_params['opt_path'] = './vhost-net%d' % i
+ vm_params['opt_path'] = self.base_dir + '/vhost-net%d' % i
vm_params['opt_mac'] = "00:11:22:33:44:5%d" % i
vm_params['opt_server'] = 'server'
if self.queues > 1:
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 08/15] tests/vm2vm_virtio_pmd:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (5 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 07/15] tests/vhost_event_idx_interrupt:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 09/15] tests/vm2vm_virtio_net_perf:Change " zhu,shuai
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_vm2vm_virtio_pmd.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_vm2vm_virtio_pmd.py b/tests/TestSuite_vm2vm_virtio_pmd.py
index ca97d4d..c172dd0 100644
--- a/tests/TestSuite_vm2vm_virtio_pmd.py
+++ b/tests/TestSuite_vm2vm_virtio_pmd.py
@@ -58,6 +58,7 @@ class TestVM2VMVirtioPMD(TestCase):
self.memory_channel = self.dut.get_memory_channels()
self.vm_num = 2
self.dump_pcap = "/root/pdump-rx.pcap"
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
@@ -68,7 +69,7 @@ class TestVM2VMVirtioPMD(TestCase):
self.result_table_create(self.table_header)
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.vhost = self.dut.new_session(suite="vhost")
self.vm_dut = []
self.vm = []
@@ -93,12 +94,12 @@ class TestVM2VMVirtioPMD(TestCase):
"""
self.command_line = self.dut.target + "/app/testpmd -c %s -n %d " + \
"--socket-mem 2048,2048 --legacy-mem --no-pci --file-prefix=vhost " + \
- "--vdev 'net_vhost0,iface=vhost-net0,queues=1' " + \
- "--vdev 'net_vhost1,iface=vhost-net1,queues=1' " + \
+ "--vdev 'net_vhost0,iface=%s/vhost-net0,queues=1' " + \
+ "--vdev 'net_vhost1,iface=%s/vhost-net1,queues=1' " + \
"-- -i --nb-cores=1 --txd=1024 --rxd=1024"
self.command_line = self.command_line % (
- self.coremask, self.memory_channel)
+ self.coremask, self.memory_channel, self.base_dir, self.base_dir)
self.vhost.send_expect(self.command_line, "testpmd> ", 30)
self.vhost.send_expect("set fwd mac", "testpmd> ", 30)
self.vhost.send_expect("start", "testpmd> ", 30)
@@ -151,7 +152,7 @@ class TestVM2VMVirtioPMD(TestCase):
vm_info = VM(self.dut, 'vm%d' % i, 'vhost_sample')
vm_params = {}
vm_params['driver'] = 'vhost-user'
- vm_params['opt_path'] = './vhost-net%d' % i
+ vm_params['opt_path'] = self.base_dir + '/vhost-net%d' % i
vm_params['opt_mac'] = "52:54:00:00:00:0%d" % (i+1)
vm_params['opt_settings'] = setting_args
vm_info.set_vm_device(**vm_params)
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 09/15] tests/vm2vm_virtio_net_perf:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (6 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 08/15] tests/vm2vm_virtio_pmd:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 10/15] tests/vhost_multi_queue_qemu:Change " zhu,shuai
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_vm2vm_virtio_net_perf.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_vm2vm_virtio_net_perf.py b/tests/TestSuite_vm2vm_virtio_net_perf.py
index 9c0f85c..0a6456a 100644
--- a/tests/TestSuite_vm2vm_virtio_net_perf.py
+++ b/tests/TestSuite_vm2vm_virtio_net_perf.py
@@ -59,6 +59,7 @@ class TestVM2VMVirtioNetPerf(TestCase):
self.vritio_mac1 = "52:54:00:00:00:01"
self.vritio_mac2 = "52:54:00:00:00:02"
self.vm_dut = None
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
@@ -68,7 +69,7 @@ class TestVM2VMVirtioNetPerf(TestCase):
self.result_table_create(self.table_header)
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.vhost = self.dut.new_session(suite="vhost")
self.vm_dut = []
self.vm = []
@@ -83,12 +84,12 @@ class TestVM2VMVirtioNetPerf(TestCase):
zerocopy_arg = ""
self.command_line = self.dut.target + "/app/testpmd -c %s -n %d " + \
"--socket-mem 2048,2048 --legacy-mem --no-pci --file-prefix=vhost " + \
- "--vdev 'net_vhost0,iface=vhost-net0,queues=1%s' " + \
- "--vdev 'net_vhost1,iface=vhost-net1,queues=1%s' " + \
+ "--vdev 'net_vhost0,iface=%s/vhost-net0,queues=1%s' " + \
+ "--vdev 'net_vhost1,iface=%s/vhost-net1,queues=1%s' " + \
"-- -i --nb-cores=1 --txd=1024 --rxd=1024"
self.command_line = self.command_line % (
- self.coremask, self.memory_channel,
+ self.coremask, self.memory_channel, self.base_dir, self.base_dir,
zerocopy_arg, zerocopy_arg)
self.vhost.send_expect(self.command_line, "testpmd> ", 30)
self.vhost.send_expect("start", "testpmd> ", 30)
@@ -110,7 +111,7 @@ class TestVM2VMVirtioNetPerf(TestCase):
vm_info = VM(self.dut, 'vm%d' % i, 'vhost_sample')
vm_params = {}
vm_params['driver'] = 'vhost-user'
- vm_params['opt_path'] = './vhost-net%d' % i
+ vm_params['opt_path'] = self.base_dir + '/vhost-net%d' % i
vm_params['opt_mac'] = "52:54:00:00:00:0%d" % (i+1)
vm_params['opt_settings'] = setting_args
vm_info.set_vm_device(**vm_params)
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 10/15] tests/vhost_multi_queue_qemu:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (7 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 09/15] tests/vm2vm_virtio_net_perf:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 11/15] tests/vhost_1024_ethports:Change " zhu,shuai
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_vhost_multi_queue_qemu.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_vhost_multi_queue_qemu.py b/tests/TestSuite_vhost_multi_queue_qemu.py
index 9d839d5..47d600b 100644
--- a/tests/TestSuite_vhost_multi_queue_qemu.py
+++ b/tests/TestSuite_vhost_multi_queue_qemu.py
@@ -79,13 +79,14 @@ class TestVhostMultiQueueQemu(TestCase):
self.tester.send_expect('mkdir -p %s' % self.out_path, '# ')
# create an instance to set stream field setting
self.pktgen_helper = PacketGeneratorHelper()
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
Run before each test case.
"""
self.dut.send_expect("rm -rf ./vhost.out", "#")
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.dut.send_expect("killall -s INT testpmd", "#")
self.frame_sizes = [64, 128, 256, 512, 1024, 1500]
@@ -98,9 +99,9 @@ class TestVhostMultiQueueQemu(TestCase):
Launch the vhost sample with different parameters
"""
testcmd = self.target + "/app/testpmd -c %s -n %d --socket-mem 1024,1024" + \
- " --vdev 'net_vhost0,iface=vhost-net,queues=%d' -- -i --rxq=%d --txq=%d --nb-cores=2"
+ " --vdev 'net_vhost0,iface=%s/vhost-net,queues=%d' -- -i --rxq=%d --txq=%d --nb-cores=2"
self.coremask = utils.create_mask(self.cores)
- testcmd_start = testcmd % (self.coremask, self.memory_channel, self.queue_number, self.queue_number, self.queue_number)
+ testcmd_start = testcmd % (self.coremask, self.memory_channel, self.base_dir, self.queue_number, self.queue_number, self.queue_number)
self.dut.send_expect(testcmd_start, "testpmd> ", 120)
self.dut.send_expect("set fwd mac", "testpmd> ", 120)
@@ -113,7 +114,7 @@ class TestVhostMultiQueueQemu(TestCase):
self.vm = VM(self.dut, 'vm0', 'vhost_sample')
vm_params = {}
vm_params['driver'] = 'vhost-user'
- vm_params['opt_path'] = './vhost-net'
+ vm_params['opt_path'] = self.base_dir + '/vhost-net'
vm_params['opt_mac'] = self.virtio1_mac
vm_params['opt_queue'] = self.queue_number
vm_params['opt_settings'] = 'mrg_rxbuf=on,mq=on,vectors=%d' % (2*self.queue_number + 2)
@@ -281,9 +282,9 @@ class TestVhostMultiQueueQemu(TestCase):
"""
self.queue_number = 2
testcmd = self.target + "/app/testpmd -c %s -n %d --socket-mem 1024,1024" + \
- " --vdev 'net_vhost0,iface=vhost-net,queues=2' -- -i --rxq=1 --txq=1 --nb-cores=1"
+ " --vdev 'net_vhost0,iface=%s/vhost-net,queues=2' -- -i --rxq=1 --txq=1 --nb-cores=1"
self.coremask = utils.create_mask(self.cores)
- testcmd_start = testcmd % (self.coremask, self.memory_channel)
+ testcmd_start = testcmd % (self.coremask, self.memory_channel, self.base_dir)
self.dut.send_expect(testcmd_start, "testpmd> ", 120)
self.dut.send_expect("set fwd mac", "testpmd> ", 120)
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 11/15] tests/vhost_1024_ethports:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (8 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 10/15] tests/vhost_multi_queue_qemu:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 12/15] tests/vdev_primary_secondary:Change " zhu,shuai
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_vhost_1024_ethports.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_vhost_1024_ethports.py b/tests/TestSuite_vhost_1024_ethports.py
index 0c14e8d..aed41ac 100644
--- a/tests/TestSuite_vhost_1024_ethports.py
+++ b/tests/TestSuite_vhost_1024_ethports.py
@@ -52,12 +52,13 @@ class TestVhost1024Ethports(TestCase):
cores = self.dut.get_core_list("1S/2C/1T")
self.coremask = utils.create_mask(cores)
self.build_user_dpdk()
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
Run before each test case.
"""
- self.dut.send_expect('rm -rf ./vhost-net*', '# ')
+ self.dut.send_expect('rm -rf %s/vhost-net*' % self.base_dir, '# ')
self.dut.send_expect('killall -s INT testpmd', '# ')
self.vhost_user = self.dut.new_session(suite='vhost-user')
@@ -77,9 +78,9 @@ class TestVhost1024Ethports(TestCase):
"""
command_line_vdev = ''
for ethport in range(self.max_ethport):
- command_line_vdev += '--vdev "eth_vhost%d,iface=vhost-net%d,queues=%d" ' %(ethport, ethport, self.queue)
+ command_line_vdev += '--vdev "eth_vhost%d,iface=%s/vhost-net%d,queues=%d" ' %(ethport, ethport, self.queue)
command_line_argument = '/app/testpmd -c %s -n %d --socket-mem 10240,10240 '\
- '--file-prefix=vhost ' %(self.coremask, self.mem_channels)
+ '--file-prefix=vhost ' %(self.base_dir, self.coremask, self.mem_channels)
command_line_client = self.dut.target + command_line_argument + command_line_vdev + '-- -i'
try:
out = self.vhost_user.send_expect(command_line_client, 'testpmd> ', 120)
@@ -92,7 +93,7 @@ class TestVhost1024Ethports(TestCase):
"""
Run after each test case.
"""
- self.dut.send_expect('rm -rf ./vhost-net*', '# ')
+ self.dut.send_expect('rm -rf %s/vhost-net*' % self.base_dir, '# ')
self.dut.close_session(self.vhost_user)
def tear_down_all(self):
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 12/15] tests/vdev_primary_secondary:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (9 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 11/15] tests/vhost_1024_ethports:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 13/15] tests/dpdk_gso_lib:Change " zhu,shuai
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_vdev_primary_secondary.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_vdev_primary_secondary.py b/tests/TestSuite_vdev_primary_secondary.py
index 6f8f235..fdffa09 100644
--- a/tests/TestSuite_vdev_primary_secondary.py
+++ b/tests/TestSuite_vdev_primary_secondary.py
@@ -62,12 +62,13 @@ class TestVdevPrimarySecondary(TestCase):
cores = self.dut.get_core_list("1S/12C/1T", socket=self.ports_socket)
self.coremask = utils.create_mask(cores)
self.verify(len(self.coremask) >= 6, "The machine has too few cores.")
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
Run before each test case.
"""
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
@@ -81,7 +82,7 @@ class TestVdevPrimarySecondary(TestCase):
for i in range(self.queues):
vm_params = {}
vm_params['driver'] = 'vhost-user'
- vm_params['opt_path'] = './vhost-net%d' % i
+ vm_params['opt_path'] = self.base_dir + '/vhost-net%d' % i
vm_params['opt_mac'] = "%s%d" % (self.virtio_mac, i+2)
vm_params['opt_queue'] = self.queues
vm_params['opt_server'] = 'server'
@@ -103,10 +104,10 @@ class TestVdevPrimarySecondary(TestCase):
launch testpmd
"""
cmd = "./%s/app/testpmd -l 1-6 -n %d --socket-mem 2048,2048 --legacy-mem --file-prefix=vhost" + \
- " --vdev 'net_vhost0,iface=vhost-net0,queues=%d,client=1'" + \
- " --vdev 'net_vhost1,iface=vhost-net1,queues=%d,client=1'" + \
+ " --vdev 'net_vhost0,iface=%s/vhost-net0,queues=%d,client=1'" + \
+ " --vdev 'net_vhost1,iface=%s/vhost-net1,queues=%d,client=1'" + \
" -- -i --nb-cores=4 --rxq=%d --txq=%d --txd=1024 --rxd=1024"
- start_cmd = cmd % (self.target, self.mem_channels, self.queues, self.queues, self.queues, self.queues)
+ start_cmd = cmd % (self.target, self.mem_channels, self.base_dir, self.queues, self.base_dir, self.queues, self.queues, self.queues)
self.dut.send_expect(start_cmd, "testpmd> ", 120)
self.dut.send_expect("set fwd txonly", "testpmd> ", 120)
self.dut.send_expect("start", "testpmd> ", 120)
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 13/15] tests/dpdk_gso_lib:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (10 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 12/15] tests/vdev_primary_secondary:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 14/15] tests/dpdk_gro_lib:Change " zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 15/15] tests/vhost_pmd_xstats:Change " zhu,shuai
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_dpdk_gso_lib.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_dpdk_gso_lib.py b/tests/TestSuite_dpdk_gso_lib.py
index 68d09cb..5cf56e4 100644
--- a/tests/TestSuite_dpdk_gso_lib.py
+++ b/tests/TestSuite_dpdk_gso_lib.py
@@ -97,12 +97,13 @@ class TestDPDKGsoLib(TestCase):
self.socket_mem = '1024,1024'
self.prepare_dpdk()
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
#
# Run before each test case.
# Clean the execution ENV
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
@@ -113,10 +114,10 @@ class TestDPDKGsoLib(TestCase):
# mode = 3: TSO
# mode = others: NO DPDK GSO/TSO
self.testcmd = self.target + "/app/testpmd -c %s -n %d --socket-mem %s --legacy-mem" \
- + " --vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i --tx-offloads=0x00 "\
+ + " --vdev 'net_vhost0,iface=%s/vhost-net,queues=1' -- -i --tx-offloads=0x00 "\
+ " --txd=1024 --rxd=1024"
self.testcmd_start = self.testcmd % (
- self.core_mask_vhost, self.memory_channel, self.socket_mem)
+ self.core_mask_vhost, self.memory_channel, self.socket_mem, self.base_dir)
self.vhost_user = self.dut.new_session(suite="user")
self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120)
self.vhost_user.send_expect("set fwd csum", "testpmd> ", 120)
@@ -246,7 +247,7 @@ class TestDPDKGsoLib(TestCase):
self.vm1.load_config()
vm_params_1 = {}
vm_params_1['driver'] = 'vhost-user'
- vm_params_1['opt_path'] = './vhost-net'
+ vm_params_1['opt_path'] = self.base_dir + '/vhost-net'
vm_params_1['opt_mac'] = self.virtio_mac1
# tcp and udp traffic
if(mode == 0):
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 14/15] tests/dpdk_gro_lib:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (11 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 13/15] tests/dpdk_gso_lib:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
2019-08-29 7:16 ` [dts] [PATCH V1 15/15] tests/vhost_pmd_xstats:Change " zhu,shuai
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_dpdk_gro_lib.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py
index b857651..c0fca39 100644
--- a/tests/TestSuite_dpdk_gro_lib.py
+++ b/tests/TestSuite_dpdk_gro_lib.py
@@ -94,13 +94,14 @@ class TestDPDKGROLib(TestCase):
else:
self.socket_mem = '1024,1024'
self.prepare_dpdk()
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
#
# Run before each test case.
#
# Clean the execution ENV
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
@@ -112,10 +113,10 @@ class TestDPDKGROLib(TestCase):
# mode 3 : vxlan traffic light mode
# mode 4 : tcp traffic flush 4
self.testcmd = self.target + "/app/testpmd -c %s -n %d --socket-mem %s --legacy-mem" \
- + " --vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i --enable-hw-vlan-strip --tx-offloads=0x00" \
+ + " --vdev 'net_vhost0,iface=%s/vhost-net,queues=1' -- -i --enable-hw-vlan-strip --tx-offloads=0x00" \
+ " --txd=1024 --rxd=1024"
self.testcmd_start = self.testcmd % (
- self.core_mask_vhost, self.memory_channel, self.socket_mem)
+ self.core_mask_vhost, self.memory_channel, self.socket_mem, self.base_dir)
self.vhost_user = self.dut.new_session(suite="user")
self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120)
self.vhost_user.send_expect("set fwd csum", "testpmd> ", 120)
@@ -246,7 +247,7 @@ class TestDPDKGROLib(TestCase):
self.vm1.load_config()
vm_params_1 = {}
vm_params_1['driver'] = 'vhost-user'
- vm_params_1['opt_path'] = './vhost-net'
+ vm_params_1['opt_path'] = self.base_dir + '/vhost-net'
vm_params_1['opt_mac'] = self.virtio_mac1
vm_params_1[
'opt_settings'] = 'mrg_rxbuf=on,csum=off,gso=off,host_tso4=on,guest_tso4=on'
@@ -383,7 +384,7 @@ class TestDPDKGROLib(TestCase):
"""
self.dut.send_expect("killall -s INT testpmd", "#")
self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
- self.dut.send_expect("rm -rf ./vhost-net", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net" % self.base_dir, "#")
time.sleep(2)
self.dut.send_expect("ip netns del ns1", "# ", 30)
self.dut.send_expect(
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dts] [PATCH V1 15/15] tests/vhost_pmd_xstats:Change the relative path to an absolute path.
2019-08-29 7:16 [dts] [PATCH V1 01/15] tests/virtio_user_as_exceptional_path:Change the relative path to an absolute path zhu,shuai
` (12 preceding siblings ...)
2019-08-29 7:16 ` [dts] [PATCH V1 14/15] tests/dpdk_gro_lib:Change " zhu,shuai
@ 2019-08-29 7:16 ` zhu,shuai
13 siblings, 0 replies; 15+ messages in thread
From: zhu,shuai @ 2019-08-29 7:16 UTC (permalink / raw)
To: dts; +Cc: yinan.wang, zhu,shuai
Change the relative path to an absolute path.
Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
tests/TestSuite_vhost_pmd_xstats.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_vhost_pmd_xstats.py b/tests/TestSuite_vhost_pmd_xstats.py
index 75b87a6..fd8218e 100755
--- a/tests/TestSuite_vhost_pmd_xstats.py
+++ b/tests/TestSuite_vhost_pmd_xstats.py
@@ -70,6 +70,7 @@ class TestVhostPmdXstats(TestCase):
out = self.dut.build_dpdk_apps("./examples/vhost")
self.verify("Error" not in out, "compilation error 1")
self.verify("No such file" not in out, "compilation error 2")
+ self.base_dir = self.dut.base_dir.replace('~', '/root')
def set_up(self):
"""
@@ -77,7 +78,7 @@ class TestVhostPmdXstats(TestCase):
Launch vhost sample using default params
"""
self.dut.send_expect("rm -rf ./vhost.out", "#")
- self.dut.send_expect("rm -rf ./vhost-net*", "#")
+ self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
self.dut.send_expect("killall vhost-switch", "#")
dut_arch = self.dut.send_expect("uname -m", "#")
self.dut.send_expect("killall qemu-system-%s" % dut_arch, "#")
@@ -107,7 +108,7 @@ class TestVhostPmdXstats(TestCase):
self.vm = QEMUKvm(self.dut, 'vm0', 'vhost_pmd_xstats')
vm_params = {}
vm_params['driver'] = 'vhost-user'
- vm_params['opt_path'] = './vhost-net'
+ vm_params['opt_path'] = self.base_dir + '/vhost-net'
vm_params['opt_mac'] = self.virtio1_mac
self.vm.set_vm_device(**vm_params)
@@ -145,8 +146,8 @@ class TestVhostPmdXstats(TestCase):
"""
prepare all of the conditions for start
"""
- self.dut.send_expect("./%s/app/testpmd -c %s -n %s --vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i --nb-cores=1" %
- (self.target, self.coremask, self.dut.get_memory_channels()), "testpmd>", 60)
+ self.dut.send_expect("./%s/app/testpmd -c %s -n %s --vdev 'net_vhost0,iface=%s/vhost-net,queues=1' -- -i --nb-cores=1" %
+ (self.target, self.coremask, self.dut.get_memory_channels(), self.base_dir), "testpmd>", 60)
self.start_onevm()
self.vm_testpmd_start()
self.dut.send_expect("set fwd mac", "testpmd>", 60)
--
2.17.2
^ permalink raw reply [flat|nested] 15+ messages in thread