[Qemu-devel] [PATCH v4 2/5] scripts/qemu.py: allow adding to the list of extra arguments

Cleber Rosa posted 5 patches 7 years, 5 months ago
[Qemu-devel] [PATCH v4 2/5] scripts/qemu.py: allow adding to the list of extra arguments
Posted by Cleber Rosa 7 years, 5 months ago
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>
---
 scripts/qemu.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/qemu.py b/scripts/qemu.py
index 08a3e9af5a..7cd8193df8 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)
-- 
2.17.0


Re: [Qemu-devel] [PATCH v4 2/5] scripts/qemu.py: allow adding to the list of extra arguments
Posted by Philippe Mathieu-Daudé 7 years, 5 months ago
On 05/30/2018 03:41 PM, Cleber Rosa wrote:
> 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>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  scripts/qemu.py | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/scripts/qemu.py b/scripts/qemu.py
> index 08a3e9af5a..7cd8193df8 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)
>