All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Foley <robert.foley@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Fam Zheng" <fam@euphon.net>,
	"Peter Puhov" <peter.puhov@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v8 12/12] tests/vm: Add workaround to consume console
Date: Mon, 1 Jun 2020 08:58:21 -0400	[thread overview]
Message-ID: <CAEyhzFt8wNGGsC6VWPAai-UGFPVQt=tNrR+5Q5OdTY7VGXv5rg@mail.gmail.com> (raw)
In-Reply-To: <235ec2d4-f8ee-5192-9da5-4e29b2599525@redhat.com>

On Sun, 31 May 2020 at 07:27, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 5/29/20 10:34 PM, Robert Foley wrote:
<snip>
> > @@ -271,7 +276,9 @@ class BaseVM(object):
> >          args += self._data_args + extra_args + self._config['extra_args']
> >          logging.debug("QEMU args: %s", " ".join(args))
> >          qemu_path = get_qemu_path(self.arch, self._build_path)
> > -        guest = QEMUMachine(binary=qemu_path, args=args)
> > +        guest = QEMUMachine(binary=qemu_path, args=args,
> > +                            console_log=self._console_log_path,
> > +                            drain_console=True)
>
> Are you sure you need to set drain_console here? Isn't it implied by
> self._console_log_path?

Good point.  Yes, drain_console is implied by self._console_log_path.
Will fix it.

Thanks & Regards,
-Rob
>
> >          guest.set_machine(self._config['machine'])
> >          guest.set_console()
> >          try:
> > @@ -285,6 +292,8 @@ class BaseVM(object):
> >              raise
> >          atexit.register(self.shutdown)
> >          self._guest = guest
> > +        # Init console so we can start consuming the chars.
> > +        self.console_init()
> >          usernet_info = guest.qmp("human-monitor-command",
> >                                   command_line="info usernet")
> >          self.ssh_port = None
> > @@ -296,7 +305,9 @@ class BaseVM(object):
> >              raise Exception("Cannot find ssh port from 'info usernet':\n%s" % \
> >                              usernet_info)
> >
> > -    def console_init(self, timeout = 120):
> > +    def console_init(self, timeout = None):
> > +        if timeout == None:
> > +            timeout = self.socket_timeout
> >          vm = self._guest
> >          vm.console_socket.settimeout(timeout)
> >          self.console_raw_path = os.path.join(vm._temp_dir,
> > @@ -578,6 +589,8 @@ def parse_args(vmcls):
> >      parser.add_option("--efi-aarch64",
> >                        default="/usr/share/qemu-efi-aarch64/QEMU_EFI.fd",
> >                        help="Path to efi image for aarch64 VMs.")
> > +    parser.add_option("--log-console", action="store_true",
> > +                      help="Log console to file.")
> >      parser.disable_interspersed_args()
> >      return parser.parse_args()
> >
> >
>


  reply	other threads:[~2020-06-01 12:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 20:34 [PATCH v8 00/12] tests/vm: Add support for aarch64 VMs Robert Foley
2020-05-29 20:34 ` [PATCH v8 01/12] tests/vm: pass args through to BaseVM's __init__ Robert Foley
2020-05-31 10:29   ` Philippe Mathieu-Daudé
2020-05-29 20:34 ` [PATCH v8 02/12] tests/vm: Add configuration to basevm.py Robert Foley
2020-05-29 20:34 ` [PATCH v8 03/12] tests/vm: Added configuration file support Robert Foley
2020-05-29 20:34 ` [PATCH v8 04/12] tests/vm: Pass --debug through for vm-boot-ssh Robert Foley
2020-05-29 20:34 ` [PATCH v8 05/12] tests/vm: Add ability to select QEMU from current build Robert Foley
2020-05-31 10:30   ` Philippe Mathieu-Daudé
2020-05-29 20:34 ` [PATCH v8 06/12] tests/vm: allow wait_ssh() to specify command Robert Foley
2020-05-31 11:25   ` Philippe Mathieu-Daudé
2020-05-29 20:34 ` [PATCH v8 07/12] tests/vm: Add common Ubuntu python module Robert Foley
2020-05-31 10:36   ` Philippe Mathieu-Daudé
2020-06-01 12:07     ` Robert Foley
2020-05-29 20:34 ` [PATCH v8 08/12] tests/vm: Added a new script for ubuntu.aarch64 Robert Foley
2020-05-31 10:25   ` Philippe Mathieu-Daudé
2020-05-31 10:54     ` Alex Bennée
2020-06-01 13:11       ` Robert Foley
2020-05-29 20:34 ` [PATCH v8 09/12] tests/vm: Added a new script for centos.aarch64 Robert Foley
2020-05-29 20:34 ` [PATCH v8 10/12] tests/vm: change scripts to use self._config Robert Foley
2020-05-29 20:34 ` [PATCH v8 11/12] python/qemu: Add ConsoleSocket for optional use in QEMUMachine Robert Foley
2020-05-31 11:22   ` Philippe Mathieu-Daudé
2020-06-01 13:00     ` Robert Foley
2020-05-29 20:34 ` [PATCH v8 12/12] tests/vm: Add workaround to consume console Robert Foley
2020-05-31 11:27   ` Philippe Mathieu-Daudé
2020-06-01 12:58     ` Robert Foley [this message]
2020-05-31 11:52 ` [PATCH v8 00/12] tests/vm: Add support for aarch64 VMs 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='CAEyhzFt8wNGGsC6VWPAai-UGFPVQt=tNrR+5Q5OdTY7VGXv5rg@mail.gmail.com' \
    --to=robert.foley@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=fam@euphon.net \
    --cc=peter.puhov@linaro.org \
    --cc=philmd@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 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.