yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 1b7816394c8475dce6033b6f6cd4b57785898345 Mon Sep 17 00:00:00 2001
From: Yash Mankad <ymankad@redhat.com>
Date: Wed, 12 Dec 2018 00:14:36 +0000
Subject: [PATCH 08/13] scripts/qemu.py: allow adding to the list of extra
 arguments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

RH-Author: Yash Mankad <ymankad@redhat.com>
Message-id: <c4e393048264217e2994c26c5558d6f11fc937fe.1544573601.git.ymankad@redhat.com>
Patchwork-id: 83438
O-Subject: [RHEL-8.0 qemu-kvm PATCH v2 2/7] scripts/qemu.py: allow adding to the list of extra arguments
Bugzilla: 1655807
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Acked-by: John Snow <jsnow@redhat.com>
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>

From: Cleber Rosa <crosa@redhat.com>

Tests will often need to add extra arguments to QEMU command
line arguments.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20180530184156.15634-3-crosa@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
(cherry picked from commit 572a82438308216fbfc615c924b6e94e4b68dfaa)
Signed-off-by: Yash Mankad <ymankad@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
 scripts/qemu.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/qemu.py b/scripts/qemu.py
index 08a3e9a..7cd8193 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -359,3 +359,9 @@ class QEMUMachine(object):
         of the qemu process.
         '''
         return self._iolog
+
+    def add_args(self, *args):
+        '''
+        Adds to the list of extra arguments to be given to the QEMU binary
+        '''
+        self._args.extend(args)
-- 
1.8.3.1