From: Cleber Rosa <crosa@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Lukáš Doktor" <ldoktor@redhat.com>,
"Amador Pahim" <apahim@redhat.com>,
"Stefan Hajnoczi" <stefanha@gmail.com>,
"Zheng Xiang" <xiang.zheng@linaro.org>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Fam Zheng" <famz@redhat.com>,
"Alistair Francis" <alistair23@gmail.com>,
"Eduardo Habkost" <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH 3/7] qemu.py: Check console arch is supported before calling mktemp()
Date: Tue, 1 May 2018 15:30:04 -0400 [thread overview]
Message-ID: <46d433c0-eddd-03c8-d695-c30cd1ffd1e7@redhat.com> (raw)
In-Reply-To: <20180419164642.9536-4-f4bug@amsat.org>
On 04/19/2018 12:46 PM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> scripts/qemu.py | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/scripts/qemu.py b/scripts/qemu.py
> index 0eecc44d09..379767b62f 100644
> --- a/scripts/qemu.py
> +++ b/scripts/qemu.py
> @@ -189,6 +189,16 @@ class QEMUMachine(object):
> if option in item:
> return []
>
> + device = '{dev_type},chardev=console'
> + if '86' in self._arch:
> + device = device.format(dev_type='isa-serial')
> + elif 'ppc' in self._arch:
> + device = device.format(dev_type='spapr-vty')
> + elif 's390x' in self._arch:
> + device = device.format(dev_type='sclpconsole')
> + else:
> + return []
> +
> chardev = 'socket,id=console,{address},server,nowait'
> if console_address is None:
> console_address = tempfile.mktemp()
> @@ -203,16 +213,6 @@ class QEMUMachine(object):
>
> self._console_address = console_address
>
> - device = '{dev_type},chardev=console'
> - if '86' in self._arch:
> - device = device.format(dev_type='isa-serial')
> - elif 'ppc' in self._arch:
> - device = device.format(dev_type='spapr-vty')
> - elif 's390x' in self._arch:
> - device = device.format(dev_type='sclpconsole')
> - else:
> - return []
> -
> return ['-chardev', chardev,
> '-device', device]
>
>
I understand your point here, but I found the commit message to be
misleading. You're probably referring to this snippet (from
tests/avocado/test_linux-boot-console.py):
+ def setUp(self):
+ self.console_path = tempfile.mkstemp()[1]
So I see the following points regarding this patch:
1) Function called is mkstemp(), and not mktemp(), assuming you meant
the one from the pasted snippet above.
2) The commit message should just state that it returns earlier when
architecture is not supported wrt console creation.
next prev parent reply other threads:[~2018-05-01 19:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 16:46 [Qemu-devel] [RFC PATCH 0/7] avocado: Add acceptance tests parsing the Linux boot console Philippe Mathieu-Daudé
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 1/7] AVOCADO_QEMU: Snapshot commit Philippe Mathieu-Daudé
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 2/7] avocado: Update python scripts to upstream codebase Philippe Mathieu-Daudé
2018-05-01 0:56 ` Cleber Rosa
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 3/7] qemu.py: Check console arch is supported before calling mktemp() Philippe Mathieu-Daudé
2018-05-01 19:30 ` Cleber Rosa [this message]
2018-05-01 19:35 ` Cleber Rosa
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 4/7] qemu.py: Avoid deprecated tempfile.mktemp() Philippe Mathieu-Daudé
2018-05-01 19:33 ` Cleber Rosa
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 5/7] avocado: Add an optional flag 'login' to get_console() Philippe Mathieu-Daudé
2018-05-01 19:46 ` Cleber Rosa
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 6/7] avocado: Add a test parsing Linux kernel booting console Philippe Mathieu-Daudé
2018-04-19 19:38 ` Richard Henderson
2018-05-01 21:17 ` Cleber Rosa
2018-04-19 16:46 ` [Qemu-devel] [RFC PATCH 7/7] avocado: Add tests booting the Malta machine Philippe Mathieu-Daudé
2018-05-01 21:20 ` Cleber Rosa
2018-04-19 17:14 ` [Qemu-devel] [RFC PATCH 0/7] avocado: Add acceptance tests parsing the Linux boot console no-reply
2018-04-20 4:17 ` Philippe Mathieu-Daudé
2018-04-20 12:59 ` Philippe Mathieu-Daudé
2018-05-02 16:22 ` Cleber Rosa
2018-04-30 22:49 ` Cleber Rosa
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=46d433c0-eddd-03c8-d695-c30cd1ffd1e7@redhat.com \
--to=crosa@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=alistair23@gmail.com \
--cc=apahim@redhat.com \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=famz@redhat.com \
--cc=ldoktor@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=xiang.zheng@linaro.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).