From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id E71411B2FF for ; Mon, 12 Feb 2018 10:58:27 +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 6820015AB; Mon, 12 Feb 2018 01:58:27 -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 EEA9E3F41F; Mon, 12 Feb 2018 01:58:26 -0800 (PST) From: Herbert Guan To: dts@dpdk.org Cc: Herbert Guan Date: Mon, 12 Feb 2018 17:57:38 +0800 Message-Id: <1518429462-30299-6-git-send-email-herbert.guan@arm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518429462-30299-1-git-send-email-herbert.guan@arm.com> References: <1518157565-17167-1-git-send-email-herbert.guan@arm.com> <1518429462-30299-1-git-send-email-herbert.guan@arm.com> Subject: [dts] [PATCH v2 5/9] tests/vf_to_vf_nic_bridge: 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: Mon, 12 Feb 2018 09:58:28 -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_to_vf_bridge.cfg | 6 +++++- tests/TestSuite_vf_to_vf_nic_bridge.py | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/conf/vf_to_vf_bridge.cfg b/conf/vf_to_vf_bridge.cfg index 537b3da..f9cc911 100644 --- a/conf/vf_to_vf_bridge.cfg +++ b/conf/vf_to_vf_bridge.cfg @@ -1,4 +1,4 @@ -# vm configuration for vhost sample case +# Configuration sample: sriov_kvm.cfg [vm0] cpu = model=host,number=4,cpupin=20 21 22 23; @@ -8,8 +8,10 @@ disk = file=/home/img/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=4; +# daemon option is not supported by libvirt yet, comment out below 2 lines if using libvirt daemon = enable=yes; @@ -22,7 +24,9 @@ disk = file=/home/img/vm1.img; login = user=root,password=tester; +# vnc option is not supported by libvirt yet, comment out below 2 lines if using libvirt vnc = displayNum=5; +# 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_to_vf_nic_bridge.py b/tests/TestSuite_vf_to_vf_nic_bridge.py index a85cab5..356795a 100644 --- a/tests/TestSuite_vf_to_vf_nic_bridge.py +++ b/tests/TestSuite_vf_to_vf_nic_bridge.py @@ -39,7 +39,7 @@ import time import pdb from test_case import TestCase -from qemu_kvm import QEMUKvm +from virt_common import VM from pmd_output import PmdOutput VF_NUMS_ON_ONE_PF = 2 @@ -93,7 +93,7 @@ class TestVF2VFBridge(TestCase): vf0_prop = {'opt_host': self.sriov_vfs_ports[0].pci} vf1_prop = {'opt_host': self.sriov_vfs_ports[1].pci} time.sleep(1) - self.vm0 = QEMUKvm(self.dut, 'vm0', 'vf_to_vf_bridge') + self.vm0 = VM(self.dut, 'vm0', 'vf_to_vf_bridge') self.vm0.set_vm_device(driver=self.vf_assign_method, **vf0_prop) try: self.vm0_dut = self.vm0.start() @@ -102,7 +102,7 @@ class TestVF2VFBridge(TestCase): except Exception as e: print utils.RED(str(e)) - self.vm1 = QEMUKvm(self.dut, 'vm1', 'vf_to_vf_bridge') + self.vm1 = VM(self.dut, 'vm1', 'vf_to_vf_bridge') self.vm1.set_vm_device(driver=self.vf_assign_method, **vf1_prop) try: self.vm1_dut = self.vm1.start() -- 1.8.3.1