[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v3 2/6] tests/acceptance: Add a kludge to no
From: |
Cleber Rosa |
Subject: |
Re: [Qemu-devel] [RFC PATCH v3 2/6] tests/acceptance: Add a kludge to not use the default console |
Date: |
Fri, 19 Oct 2018 13:37:32 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 10/13/18 11:15 AM, Philippe Mathieu-Daudé wrote:
> The board already instantiate the proper devices, we don't want to
> add extra devices but connect the chardev to one of the serial already
> available.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> scripts/qemu.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/qemu.py b/scripts/qemu.py
> index fca9b76990..7e779954e6 100644
> --- a/scripts/qemu.py
> +++ b/scripts/qemu.py
> @@ -221,8 +221,10 @@ class QEMUMachine(object):
> self._name +
> "-console.sock")
> chardev = ('socket,id=console,path=%s,server,nowait' %
> self._console_address)
> - device = '%s,chardev=console' % self._console_device_type
> - args.extend(['-chardev', chardev, '-device', device])
> + args.extend(['-chardev', chardev])
> + if len(self._console_device_type):
Considering `self._console_device_type` will come from `set_console()`,
either explicitly as the "device_type" parameter, or from the list on
CONSOLE_DEV_TYPES, wouldn't it make more sense to just drop the
definitions for the machine types that don't need an explicit device?
That way, self.set_console() could be called with no arguments (instead
of the empty string). And this check would become:
if self._console_device_type is not None:
> + device = '%s,chardev=console' % self._console_device_type
> + args.extend(['-device', device])
> return args
>
> def _pre_launch(self):
>