From: Cleber Rosa <crosa@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Eduardo Habkost" <ehabkost@redhat.com>
Cc: "Lukáš Doktor" <ldoktor@redhat.com>,
"Fam Zheng" <famz@redhat.com>,
qemu-devel@nongnu.org
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 [thread overview]
Message-ID: <6dd4b200-03d1-728d-45b2-a89c5461d5cc@redhat.com> (raw)
In-Reply-To: <20181013151545.3731-3-f4bug@amsat.org>
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é <f4bug@amsat.org>
> ---
> 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):
>
next prev parent reply other threads:[~2018-10-19 17:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-13 15:15 [Qemu-devel] [PATCH v3 0/6] Avocado: more multi-arch tests Philippe Mathieu-Daudé
2018-10-13 15:15 ` [Qemu-devel] [PATCH v3 1/6] tests/acceptance: Rename the generic BootLinuxConsole test as test_x86_64_pc Philippe Mathieu-Daudé
2018-10-19 18:15 ` Cleber Rosa
2018-10-13 15:15 ` [Qemu-devel] [RFC PATCH v3 2/6] tests/acceptance: Add a kludge to not use the default console Philippe Mathieu-Daudé
2018-10-19 17:37 ` Cleber Rosa [this message]
2018-10-19 17:45 ` Philippe Mathieu-Daudé
2018-10-13 15:15 ` [Qemu-devel] [PATCH v3 3/6] tests/acceptance: Add test_mips_4kc_malta in BootLinuxConsole Philippe Mathieu-Daudé
2018-10-19 17:42 ` Cleber Rosa
2018-10-19 18:41 ` Philippe Mathieu-Daudé
2018-10-19 21:17 ` Cleber Rosa
2018-10-19 22:51 ` Cleber Rosa
2018-10-20 9:57 ` Philippe Mathieu-Daudé
2018-10-13 15:15 ` [Qemu-devel] [PATCH v3 4/6] tests/acceptance: Add test_mipsel_5kc_malta " Philippe Mathieu-Daudé
2018-10-13 15:15 ` [Qemu-devel] [PATCH v3 5/6] tests/acceptance: Add test_sh4_r2d " Philippe Mathieu-Daudé
2018-10-13 15:56 ` Philippe Mathieu-Daudé
2018-10-13 15:15 ` [Qemu-devel] [RFC PATCH v3 6/6] tests/acceptance: Add test_sh4_r2d in BootLinuxTracing Philippe Mathieu-Daudé
2018-10-20 0:02 ` Cleber Rosa
2018-10-15 6:41 ` [Qemu-devel] [PATCH v3 0/6] Avocado: more multi-arch tests Thomas Huth
2018-10-19 5:13 ` Philippe Mathieu-Daudé
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=6dd4b200-03d1-728d-45b2-a89c5461d5cc@redhat.com \
--to=crosa@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=famz@redhat.com \
--cc=ldoktor@redhat.com \
--cc=qemu-devel@nongnu.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).