All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Goldish <mgoldish@redhat.com>
To: Lucas Meneghel Rodrigues <lmr@redhat.com>
Cc: autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 5/5] KVM test: Make it possible to run VMs without NICs
Date: Fri, 25 Jun 2010 13:03:22 +0300	[thread overview]
Message-ID: <4C247EEA.5070202@redhat.com> (raw)
In-Reply-To: <1277422386-13516-5-git-send-email-lmr@redhat.com>

On 06/25/2010 02:33 AM, Lucas Meneghel Rodrigues wrote:
> For unittesting, for example, is interesting that we
> run the VM with the bare mininum number of parameters.
> This fix allows that.
> 
> Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
> ---
>  client/tests/kvm/kvm_vm.py |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
> index 7b1fc05..3c01fa0 100755
> --- a/client/tests/kvm/kvm_vm.py
> +++ b/client/tests/kvm/kvm_vm.py
> @@ -118,8 +118,9 @@ class VM:
>          self.root_dir = root_dir
>          self.address_cache = address_cache
>          self.netdev_id = []
> -        for nic in params.get("nics").split():
> -            self.netdev_id.append(kvm_utils.generate_random_id())
> +        if params.get("nics"):
> +            for nic in params.get("nics").split():

That's exactly what kvm_utils.get_sub_dict_names() does.  It may be a
long name for something so simple but it's used everywhere in kvm-autotest.

> +                self.netdev_id.append(kvm_utils.generate_random_id())

I think the 3 lines above belong in VM.create(), not VM.__init__(),
because VM params are routinely changed in calls to VM.create().  If the
code stays in __init__() the changed params will not affect
self.netdev_id.  A good place for it would be near the code that handles
-redir.

>  
>          # Find a unique identifier for this VM
>          while True:

      reply	other threads:[~2010-06-25 10:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24 23:33 [PATCH 1/5] KVM test: support kernel -append command line options Lucas Meneghel Rodrigues
2010-06-24 23:33 ` [PATCH 2/5] KVM test: add boolean 'testdev' VM parameter for RHEL-6 style unit tests Lucas Meneghel Rodrigues
2010-06-24 23:33 ` [PATCH 3/5] KVM test: add wrapper for RHEL-6 style unittests Lucas Meneghel Rodrigues
2010-06-25 14:26   ` Michael Goldish
2010-06-24 23:33 ` [PATCH 4/5] KVM test: add sample RHEL-6 style unittest config file Lucas Meneghel Rodrigues
2010-06-24 23:33 ` [PATCH 5/5] KVM test: Make it possible to run VMs without NICs Lucas Meneghel Rodrigues
2010-06-25 10:03   ` Michael Goldish [this message]

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=4C247EEA.5070202@redhat.com \
    --to=mgoldish@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=lmr@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.