All of lore.kernel.org
 help / color / mirror / Atom feed
From: Balamuruhan S <bala24@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: ehabkost@redhat.com, ccarrara@redhat.com, groug@kaod.org,
	Balamuruhan S <bala24@linux.ibm.com>,
	sathnaga@linux.vnet.ibm.com, clg@kaod.org, crosa@redhat.com,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au
Subject: [Qemu-devel] [PATCH 2/3] tests/acceptance/avocado_qemu: add method to get supported machine types
Date: Mon, 16 Sep 2019 15:04:44 +0530	[thread overview]
Message-ID: <20190916093445.20507-3-bala24@linux.ibm.com> (raw)
In-Reply-To: <20190916093445.20507-1-bala24@linux.ibm.com>

add `get_machine_types()` to return list of supported machine types
by the qemu binary.

Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
---
 tests/acceptance/avocado_qemu/__init__.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index bd41e0443c..42a1b572bd 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -85,6 +85,12 @@ class Test(avocado.Test):
             self._vms[name] = self._new_vm(*args)
         return self._vms[name]
 
+    def get_machine_types(self):
+        cmd = "%s -machine ?" % self.qemu_bin
+        output = avocado.utils.process.getoutput(cmd).split("\n")
+        output.remove("Supported machines are:")
+        return [each.split()[0] for each in output]
+
     def tearDown(self):
         for vm in self._vms.values():
             vm.shutdown()
-- 
2.14.5



  parent reply	other threads:[~2019-09-16  9:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16  9:34 [Qemu-devel] [PATCH 0/3] Add acceptance test for migration Balamuruhan S
2019-09-16  9:34 ` [Qemu-devel] [PATCH 1/3] tests/acceptance/migration: fix post migration check Balamuruhan S
2019-09-16 18:50   ` Dr. David Alan Gilbert
2019-09-17  8:51     ` Balamuruhan S
2019-09-17  9:40       ` Dr. David Alan Gilbert
2019-09-16  9:34 ` Balamuruhan S [this message]
2019-09-16  9:34 ` [Qemu-devel] [PATCH 3/3] tests/acceptance/migration: test to migrate will all machine types Balamuruhan S
2019-09-16 14:50   ` Dr. David Alan Gilbert
2019-09-17  8:45     ` Balamuruhan S
2019-09-17  9:44       ` Dr. David Alan Gilbert
2019-09-18  0:46         ` David Gibson
  -- strict thread matches above, loose matches on Subject: below --
2019-08-05 18:20 [Qemu-devel] [PATCH 0/3] Add acceptance test for migration Balamuruhan S
2019-08-05 18:20 ` [Qemu-devel] [PATCH 2/3] tests/acceptance/avocado_qemu: add method to get supported machine types Balamuruhan S

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=20190916093445.20507-3-bala24@linux.ibm.com \
    --to=bala24@linux.ibm.com \
    --cc=ccarrara@redhat.com \
    --cc=clg@kaod.org \
    --cc=crosa@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=ehabkost@redhat.com \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sathnaga@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.