[dts] [PATCH v2 4/9] tests/vf_vlan: use virt_common for VM creation
Herbert Guan
herbert.guan at arm.com
Mon Feb 12 10:57:37 CET 2018
Use 'VM' form virt_common instead of 'QEMUKvm' from qemu_kvm for VM
creation. This will allow VM type selection (kvm/libvirt etc.) for
each VM defined in test suite's config file.
Signed-off-by: Herbert Guan <herbert.guan at arm.com>
---
conf/vf_vlan.cfg | 3 +++
tests/TestSuite_vf_vlan.py | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/conf/vf_vlan.cfg b/conf/vf_vlan.cfg
index 94e68b4..5e0754b 100644
--- a/conf/vf_vlan.cfg
+++ b/conf/vf_vlan.cfg
@@ -1,3 +1,4 @@
+# Configuration sample: sriov_kvm.cfg
[vm0]
cpu =
model=host,number=4,cpupin=5 6 7 8;
@@ -5,7 +6,9 @@ disk =
file=/storage/vm-image/vm0.img;
login =
user=root,password=tester;
+# vnc option is not supported by libvirt yet, comment out below 2 lines if using libvirt
vnc =
displayNum=1;
+# daemon option is not supported by libvirt yet, comment out below 2 lines if using libvirt
daemon =
enable=yes;
diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
index c0b26a3..da9330d 100644
--- a/tests/TestSuite_vf_vlan.py
+++ b/tests/TestSuite_vf_vlan.py
@@ -3,7 +3,7 @@
import re
import time
-from qemu_kvm import QEMUKvm
+from virt_common import VM
from test_case import TestCase
from pmd_output import PmdOutput
from packet import Packet, sniff_packets, load_sniff_packets
@@ -114,7 +114,7 @@ class TestVfVlan(TestCase):
vf1_prop = {'opt_host': self.sriov_vfs_port_1[0].pci}
# set up VM0 ENV
- self.vm0 = QEMUKvm(self.dut, 'vm0', 'vf_vlan')
+ self.vm0 = VM(self.dut, 'vm0', 'vf_vlan')
self.vm0.set_vm_device(driver=self.vf_assign_method, **vf0_prop)
self.vm0.set_vm_device(driver=self.vf_assign_method, **vf1_prop)
self.vm_dut_0 = self.vm0.start()
--
1.8.3.1
More information about the dts
mailing list