test suite reviews and discussions
 help / color / mirror / Atom feed
From: Herbert Guan <herbert.guan@arm.com>
To: dts@dpdk.org
Cc: Herbert Guan <herbert.guan@arm.com>
Subject: [dts] [PATCH v1 8/8] tests/vf_port_start_stop: use virt_common for VM creation
Date: Fri,  9 Feb 2018 14:26:05 +0800	[thread overview]
Message-ID: <1518157565-17167-9-git-send-email-herbert.guan@arm.com> (raw)
In-Reply-To: <1518157565-17167-1-git-send-email-herbert.guan@arm.com>

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@arm.com>
---
 conf/vf_port_start_stop.cfg           | 32 +++++++++++++++++++++++++++++++-
 tests/TestSuite_vf_port_start_stop.py |  4 ++--
 2 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/conf/vf_port_start_stop.cfg b/conf/vf_port_start_stop.cfg
index 8576404..9840e86 100644
--- a/conf/vf_port_start_stop.cfg
+++ b/conf/vf_port_start_stop.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 | ...]
@@ -63,13 +80,14 @@
 #               prop_addr: 0x3
 #
 # monitor
-#       port: 6061   
+#       port: 6061
 #           note: if adding monitor to vm, need to specicy
 #                 this port, else it will get a free port
 #                 on the host machine.
 #
 # serial_port
 #       enable: [yes | no]
+#       opt_type: [pty | unix]
 #
 # vnc
 #       displayNum: 1
@@ -83,20 +101,32 @@
 
 # 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 9; 
 disk =
     file=/home/image/fedora23.img;
+# Example for libvirt:
+#    file=/var/lib/libvirt/images/DTSVM.qcow2,opt_format=qcow2,opt_bus=scsi,opt_dev=sda,opt_controller=virtio-scsi;
 mem =
     size=8196
 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=11;
+# 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_port_start_stop.py b/tests/TestSuite_vf_port_start_stop.py
index 3ebee73..a9e88d8 100644
--- a/tests/TestSuite_vf_port_start_stop.py
+++ b/tests/TestSuite_vf_port_start_stop.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 utils import RED, GREEN
@@ -180,7 +180,7 @@ class TestVfPortStartStop(TestCase):
                 self.host_testpmd.start_testpmd("1S/2C/2T", eal_param=eal_param)
 
             # set up VM0 ENV
-            self.vm0 = QEMUKvm(self.dut, 'vm0', 'vf_port_start_stop')
+            self.vm0 = VM(self.dut, 'vm0', 'vf_port_start_stop')
             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

  parent reply	other threads:[~2018-02-09  6:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09  6:25 [dts] [PATCH v1 0/8] " Herbert Guan
2018-02-09  6:25 ` [dts] [PATCH v1 1/8] tests/vf_macfilter: " Herbert Guan
2018-02-09  6:25 ` [dts] [PATCH v1 2/8] tests/vf_jumboframe: " Herbert Guan
2018-02-11 10:07   ` Liu, Yong
2018-02-09  6:26 ` [dts] [PATCH v1 3/8] tests/vf_offload: " Herbert Guan
2018-02-09  6:26 ` [dts] [PATCH v1 4/8] tests/vf_rss: " Herbert Guan
2018-02-09  6:26 ` [dts] [PATCH v1 5/8] tests/vf_to_vf_nic_bridge: " Herbert Guan
2018-02-09  6:26 ` [dts] [PATCH v1 6/8] tests/vf_vlan: " Herbert Guan
2018-02-09  6:26 ` [dts] [PATCH v1 7/8] tests/vf_packet_rxtx: " Herbert Guan
2018-02-09  6:26 ` Herbert Guan [this message]
2018-02-12  9:57 ` [dts] [PATCH v2 0/9] " Herbert Guan
2018-02-12  9:57   ` [dts] [PATCH v2 1/9] tests/sriov_kvm: " Herbert Guan
2018-02-12  9:57   ` [dts] [PATCH v2 2/9] tests/vf_port_start_stop: " Herbert Guan
2018-02-12  9:57   ` [dts] [PATCH v2 3/9] tests/vf_packet_rxtx: " Herbert Guan
2018-02-12  9:57   ` [dts] [PATCH v2 4/9] tests/vf_vlan: " Herbert Guan
2018-02-12  9:57   ` [dts] [PATCH v2 5/9] tests/vf_to_vf_nic_bridge: " Herbert Guan
2018-02-12  9:57   ` [dts] [PATCH v2 6/9] tests/vf_rss: " Herbert Guan
2018-02-12  9:57   ` [dts] [PATCH v2 7/9] tests/vf_offload: " Herbert Guan
2018-02-12  9:57   ` [dts] [PATCH v2 8/9] tests/vf_jumboframe: " Herbert Guan
2018-02-12  9:57   ` [dts] [PATCH v2 9/9] tests/vf_macfilter: " Herbert Guan
2018-02-13 12:45   ` [dts] [PATCH v2 0/9] " Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1518157565-17167-9-git-send-email-herbert.guan@arm.com \
    --to=herbert.guan@arm.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).