From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id EBEE31B61F for ; Fri, 9 Feb 2018 07:26:46 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2B6551435; Thu, 8 Feb 2018 22:26:46 -0800 (PST) Received: from lenovo-a010984.shanghai.arm.com (lenovo-a010984.shanghai.arm.com [10.169.40.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B3A083F53D; Thu, 8 Feb 2018 22:26:45 -0800 (PST) From: Herbert Guan To: dts@dpdk.org Cc: Herbert Guan Date: Fri, 9 Feb 2018 14:25:58 +0800 Message-Id: <1518157565-17167-2-git-send-email-herbert.guan@arm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518157565-17167-1-git-send-email-herbert.guan@arm.com> References: <1518157565-17167-1-git-send-email-herbert.guan@arm.com> Subject: [dts] [PATCH v1 1/8] tests/vf_macfilter: use virt_common for VM creation X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2018 06:26:47 -0000 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 --- conf/vf_macfilter.cfg | 30 ++++++++++++++++++++++++++++++ tests/TestSuite_vf_macfilter.py | 4 ++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/conf/vf_macfilter.cfg b/conf/vf_macfilter.cfg index ddf3168..1f5388b 100644 --- a/conf/vf_macfilter.cfg +++ b/conf/vf_macfilter.cfg @@ -2,6 +2,15 @@ # name # name: vm0 # +# virt_type +# virt_type: [ KVM | LIBVIRT ] +# +# os +# loader: /path/to/loader/file.fd +# note: applicable for libvirt only +# nvram: /path/to/nvram/file.fd +# note: applicable for libvirt only +# # enable_kvm # enable: [yes | no] # @@ -15,9 +24,17 @@ # # mem # size: 1024 +# note: Set VM memory size in MB # # disk # file: /path/to/image/test.img +# opt_format: [ raw | qcow2 | ... ] +# opt_bus: [ virtio | scsi | ... ] +# note: applicable for libvirt only +# opt_dev: [ sda | sdb | vda | ... ] +# note: applicable for libvirt only +# opt_controller: [ virtio-scsi | ...] +# note: applicable for libvirt only # # net # type: [nic | user | tap | bridge | ...] @@ -70,6 +87,7 @@ # # serial_port # enable: [yes | no] +# opt_type: [pty | unix] # # vnc # displayNum: 1 @@ -83,18 +101,30 @@ # vm configuration for pmd sriov case [vm0] +# Default virt_type is KVM +#virt_type = +# virt_type=LIBVIRT; +# os option is applicable for libvirt only +#os = +# loader=/usr/share/AAVMF/AAVMF_CODE.fd,nvram=/var/lib/libvirt/qemu/nvram/DTSVM_VARS.fd; cpu = model=host,number=4,cpupin=5 6 7 8; disk = file=/home/img/sriov-fc20-1.img; +# Example for libvirt: +# file=/var/lib/libvirt/images/DTSVM.qcow2,opt_format=qcow2,opt_bus=scsi,opt_dev=sda,opt_controller=virtio-scsi; login = user=root,password=tester; +# net option is not necessary for libvirt, comment out below 2 lines if using libvirt net = type=nic,opt_vlan=0; type=user,opt_vlan=0; +# monitor option is not supported by libvirt yet, comment out below 2 lines if using libvirt monitor = port=; +# 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_macfilter.py b/tests/TestSuite_vf_macfilter.py index 23105a4..f0de169 100644 --- a/tests/TestSuite_vf_macfilter.py +++ b/tests/TestSuite_vf_macfilter.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 @@ -71,7 +71,7 @@ class TestVfMacFilter(TestCase): self.host_testpmd.start_testpmd("1S/2C/2T", eal_param=eal_param) # set up VM0 ENV - self.vm0 = QEMUKvm(self.dut, 'vm0', 'vf_macfilter') + self.vm0 = VM(self.dut, 'vm0', 'vf_macfilter') 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