qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Robert Foley <robert.foley@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: "Peter Puhov" <peter.puhov@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v7 03/12] tests/vm: pass args through to BaseVM's __init__
Date: Fri, 22 May 2020 08:58:51 -0400	[thread overview]
Message-ID: <CAEyhzFuPgPmPQX5HCaxud5kvF8Soaxv888Ja+zgnWORNA+3+zw@mail.gmail.com> (raw)
In-Reply-To: <87h7waff9p.fsf@linaro.org>

On Wed, 20 May 2020 at 17:49, Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Robert Foley <robert.foley@linaro.org> writes:
>
> A brief rationale wouldn't go amiss in the commit message. e.g. "We will
> shortly need to pass more parameters to the class so lets just pass args
> rather than growing the parameter list."

Good point. I will add this to the commit message.

Thanks & Regards,
-Rob

>
> Otherwise:
>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>


>
> > Signed-off-by: Robert Foley <robert.foley@linaro.org>
> > ---
> >  tests/vm/basevm.py | 13 ++++++-------
> >  1 file changed, 6 insertions(+), 7 deletions(-)
> >
> > diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
> > index a2d4054d72..fbefda0595 100644
> > --- a/tests/vm/basevm.py
> > +++ b/tests/vm/basevm.py
> > @@ -61,9 +61,9 @@ class BaseVM(object):
> >      # 4 is arbitrary, but greater than 2,
> >      # since we found we need to wait more than twice as long.
> >      tcg_ssh_timeout_multiplier = 4
> > -    def __init__(self, debug=False, vcpus=None, genisoimage=None):
> > +    def __init__(self, args):
> >          self._guest = None
> > -        self._genisoimage = genisoimage
> > +        self._genisoimage = args.genisoimage
> >          self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-",
> >                                                           suffix=".tmp",
> >                                                           dir="."))
> > @@ -76,7 +76,7 @@ class BaseVM(object):
> >          self._ssh_pub_key_file = os.path.join(self._tmpdir, "id_rsa.pub")
> >          open(self._ssh_pub_key_file, "w").write(SSH_PUB_KEY)
> >
> > -        self.debug = debug
> > +        self.debug = args.debug
> >          self._stderr = sys.stderr
> >          self._devnull = open(os.devnull, "w")
> >          if self.debug:
> > @@ -90,8 +90,8 @@ class BaseVM(object):
> >                         (",ipv6=no" if not self.ipv6 else ""),
> >              "-device", "virtio-net-pci,netdev=vnet",
> >              "-vnc", "127.0.0.1:0,to=20"]
> > -        if vcpus and vcpus > 1:
> > -            self._args += ["-smp", "%d" % vcpus]
> > +        if args.jobs and args.jobs > 1:
> > +            self._args += ["-smp", "%d" % args.jobs]
> >          if kvm_available(self.arch):
> >              self._args += ["-enable-kvm"]
> >          else:
> > @@ -438,8 +438,7 @@ def main(vmcls):
> >              return 1
> >          logging.basicConfig(level=(logging.DEBUG if args.debug
> >                                     else logging.WARN))
> > -        vm = vmcls(debug=args.debug, vcpus=args.jobs,
> > -                   genisoimage=args.genisoimage)
> > +        vm = vmcls(args)
> >          if args.build_image:
> >              if os.path.exists(args.image) and not args.force:
> >                  sys.stderr.writelines(["Image file exists: %s\n" % args.image,
>
>
> --
> Alex Bennée


  reply	other threads:[~2020-05-22 12:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 13:22 [PATCH v7 00/12] tests/vm: Add support for aarch64 VMs Robert Foley
2020-05-19 13:22 ` [PATCH v7 01/12] configure: add alternate binary for genisoimage Robert Foley
2020-05-19 13:22 ` [PATCH v7 02/12] tests/vm: pass --genisoimage to basevm script Robert Foley
2020-05-19 13:22 ` [PATCH v7 03/12] tests/vm: pass args through to BaseVM's __init__ Robert Foley
2020-05-20 21:49   ` Alex Bennée
2020-05-22 12:58     ` Robert Foley [this message]
2020-05-19 13:22 ` [PATCH v7 04/12] tests/vm: Add configuration to basevm.py Robert Foley
2020-05-22 14:22   ` Alex Bennée
2020-05-19 13:22 ` [PATCH v7 05/12] tests/vm: Added configuration file support Robert Foley
2020-05-22 14:26   ` Alex Bennée
2020-05-19 13:22 ` [PATCH v7 06/12] tests/vm: Pass --debug through for vm-boot-ssh Robert Foley
2020-05-22 14:29   ` Alex Bennée
2020-05-19 13:22 ` [PATCH v7 07/12] tests/vm: Add ability to select QEMU from current build Robert Foley
2020-05-22 14:40   ` Alex Bennée
2020-05-22 18:53     ` Robert Foley
2020-05-19 13:22 ` [PATCH v7 08/12] tests/vm: allow wait_ssh() to specify command Robert Foley
2020-05-19 13:22 ` [PATCH v7 09/12] tests/vm: Added a new script for ubuntu.aarch64 Robert Foley
2020-05-22 15:34   ` Alex Bennée
2020-05-22 19:24     ` Robert Foley
2020-05-19 13:22 ` [PATCH v7 10/12] tests/vm: Added a new script for centos.aarch64 Robert Foley
2020-05-22 15:59   ` Alex Bennée
2020-05-22 19:44     ` Robert Foley
2020-05-19 13:22 ` [PATCH v7 11/12] tests/vm: change scripts to use self._config Robert Foley
2020-05-19 13:22 ` [PATCH v7 12/12] tests/vm: Add workaround to consume console Robert Foley
2020-05-22 16:31   ` Alex Bennée
2020-05-22 20:44     ` Robert Foley

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=CAEyhzFuPgPmPQX5HCaxud5kvF8Soaxv888Ja+zgnWORNA+3+zw@mail.gmail.com \
    --to=robert.foley@linaro.org \
    --cc=alex.bennee@linaro.org \
    --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 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).