All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Cleber Rosa <crosa@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-devel@nongnu.org, "Fam Zheng" <famz@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Amador Pahim" <amador@pahim.org>
Subject: Re: [Qemu-devel] [PATCH v2 4/5] scripts/qemu.py: introduce set_console() method
Date: Tue, 29 May 2018 10:19:50 -0300	[thread overview]
Message-ID: <20180529131950.GY8988@localhost.localdomain> (raw)
In-Reply-To: <da53d1ab-69c1-dedd-9f1a-efd57b7766ea@redhat.com>

On Tue, May 29, 2018 at 09:01:42AM -0400, Cleber Rosa wrote:
> On 05/26/2018 12:54 AM, Philippe Mathieu-Daudé wrote:
> > Hi Cleber,
> > 
> > On 05/25/2018 03:42 PM, Cleber Rosa wrote:
> >> The set_console() method is intended to ease higher level use cases
> >> that require a console device.
> >>
> >> The amount of intelligence is limited on purpose, requiring either the
> >> device type explicitly, or the existence of a machine (pattern)
> >> definition.
> >>
> >> Because of the console device type selection criteria (by machine
> >> type), users should also be able to define that.  It'll then be used
> >> for both '-machine' and for the console device type selection.
> >>
> >> Users of the set_console() method will certainly be interested in
> >> accessing the console device, and for that a console_socket property
> >> has been added.
> >>
> >> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> >> ---
> >>  scripts/qemu.py      |  97 +++++++++++++++++++++-
> >>  scripts/test_qemu.py | 186 +++++++++++++++++++++++++++++++++++++++++++
> >>  2 files changed, 282 insertions(+), 1 deletion(-)
> >>  create mode 100644 scripts/test_qemu.py
> >>
> >> diff --git a/scripts/qemu.py b/scripts/qemu.py
> >> index 7cd8193df8..f099ce7278 100644
> >> --- a/scripts/qemu.py
> >> +++ b/scripts/qemu.py
> >> @@ -17,19 +17,41 @@ import logging
> >>  import os
> >>  import subprocess
> >>  import qmp.qmp
> >> +import re
> >>  import shutil
> >> +import socket
> >>  import tempfile
> >>  
> >>  
> >>  LOG = logging.getLogger(__name__)
> >>  
> >>  
> >> +#: Maps machine types to the preferred console device types
> > 
> > This could be QMP query-able...
> > 
> 
> I'm not an expert here, but IIRC Eduardo thinks that the best solution
> may be for these machine types to implement support for "-serial"
> instead.  When all machines do that, then this "set_console()" would
> default to adding a "-serial" argument if no device type is given.

Both 'query-machines' and '-serial' would be good solutions for
this, IMO.  But I don't think this should block the inclusion of
avocado_qemu.

> 
> >> +CONSOLE_DEV_TYPES = {
> >> +    r'^clipper$': 'isa-serial',
> >> +    r'^malta': 'isa-serial',
> >> +    r'^(pc.*|q35.*|isapc)$': 'isa-serial',
> >> +    r'^(40p|powernv|prep)$': 'isa-serial',
> >> +    r'^pseries.*': 'spapr-vty',
> >> +    r'^s390-ccw-virtio.*': 'sclpconsole',
> >> +    }
> >> +
> >> +
[...]

-- 
Eduardo

  reply	other threads:[~2018-05-29 13:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 18:42 [Qemu-devel] [PATCH v2 0/5] Acceptance/functional tests Cleber Rosa
2018-05-25 18:42 ` [Qemu-devel] [PATCH v2 1/5] Add functional/acceptance tests infrastructure Cleber Rosa
2018-05-25 18:42 ` [Qemu-devel] [PATCH v2 2/5] scripts/qemu.py: allow adding to the list of extra arguments Cleber Rosa
2018-05-25 18:42 ` [Qemu-devel] [PATCH v2 3/5] Acceptance tests: add quick VNC tests Cleber Rosa
2018-05-25 18:42 ` [Qemu-devel] [PATCH v2 4/5] scripts/qemu.py: introduce set_console() method Cleber Rosa
2018-05-26  4:54   ` Philippe Mathieu-Daudé
2018-05-29 13:01     ` Cleber Rosa
2018-05-29 13:19       ` Eduardo Habkost [this message]
2018-05-29 14:16   ` Cleber Rosa
2018-05-25 18:42 ` [Qemu-devel] [PATCH v2 5/5] Acceptance tests: add Linux kernel boot and console checking test 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=20180529131950.GY8988@localhost.localdomain \
    --to=ehabkost@redhat.com \
    --cc=amador@pahim.org \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=famz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.