[dts] [PATCH V1 2/8] tests/pvp_virtio_bonding:vhost-net changed to absolute path

zhuwenhui wenhuix.zhu at intel.com
Wed Sep 4 08:55:38 CEST 2019


Vhost-net changed to absolute path.

Signed-off-by: zhuwenhui <wenhuix.zhu at intel.com>
---
 tests/TestSuite_pvp_virtio_bonding.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_pvp_virtio_bonding.py b/tests/TestSuite_pvp_virtio_bonding.py
index bcfbfd4..4fb94f2 100644
--- a/tests/TestSuite_pvp_virtio_bonding.py
+++ b/tests/TestSuite_pvp_virtio_bonding.py
@@ -69,6 +69,7 @@ class TestPVPVirtIOBonding(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):
         """
@@ -86,7 +87,7 @@ class TestPVPVirtIOBonding(TestCase):
         """
         vdev_info = ""
         for i in range(self.queues):
-            vdev_info += "--vdev 'net_vhost%d,iface=vhost-net%d,client=1,queues=1' " % (i, i)
+            vdev_info += "--vdev 'net_vhost%d,iface=%s/vhost-net%d,client=1,queues=1' " % (i, self.base_dir, i)
         params = "--port-topology=chained --nb-cores=4 --txd=1024 --rxd=1024"
         eal_param = "--socket-mem 2048,2048 --legacy-mem --file-prefix=vhost %s " % vdev_info
         self.vhost_testpmd = PmdOutput(self.dut)
@@ -195,7 +196,7 @@ class TestPVPVirtIOBonding(TestCase):
         for i in range(self.queues):
             vm_params['opt_server'] = 'server'
             vm_params['driver'] = 'vhost-user'
-            vm_params['opt_path'] = './vhost-net%d' % i
+            vm_params['opt_path'] = '%s/vhost-net%d' % (self.base_dir, i)
             vm_params['opt_mac'] = "%s%d" % (virtio_mac, i+1)
             self.vm.set_vm_device(**vm_params)
         self.set_vm_vcpu()
-- 
2.17.2



More information about the dts mailing list