kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Feng Yang <fyang@redhat.com>
To: Michael Goldish <mgoldish@redhat.com>
Cc: autotest@test.kernel.org, kvm@vger.kernel.org, lmr <lmr@redhat.com>
Subject: Re: [KVM-AUTOTEST PATCH] KVM test: use command line option wrapper functions
Date: Thu, 20 May 2010 22:03:26 -0400 (EDT)	[thread overview]
Message-ID: <1674046239.953231274407406396.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> (raw)
In-Reply-To: <1160970060.953181274407267225.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com>


----- "Lucas Meneghel Rodrigues" <lmr@redhat.com> wrote:

> From: "Lucas Meneghel Rodrigues" <lmr@redhat.com>
> To: "Michael Goldish" <mgoldish@redhat.com>
> Cc: "Feng Yang" <fyang@redhat.com>, autotest@test.kernel.org, kvm@vger.kernel.org
> Sent: Thursday, May 20, 2010 6:57:23 PM GMT +08:00 Beijing / Chongqing / Hong Kong / Urumqi
> Subject: Re: [KVM-AUTOTEST PATCH] KVM test: use command line option wrapper functions
>
> On Thu, 2010-05-20 at 12:50 +0300, Michael Goldish wrote:
> > On 05/19/2010 11:25 AM, Feng Yang wrote:
> > > Hi, Michael
> > > 
> > > Thanks for your patch.
> > > We plan add "netdev" parameter support in make_qemu_command. 
> Since you are working on this part. Could you add netdev support in
> your patch? hopeful netdev can be default supported in
> make_qemu_command if qemu support it. Thanks very much!
> > 
> > Sure, I'll look into it.
> > 
> > > I think the point of this patch is good and we need this kinds of
> patch.
> > > But I think we need not add so many new function.  Especially some
> function only directly return the string and do nothing more.
> > > This will increase the function call consumption.
> > > 
> > All these helper functions are meant to be extended and modified in
> the
> > future.  They're only there to minimize future effort involved in
> adding
> > support for new command line syntaxes.
> > Right now add_smp() just returns " -smp %s", but in the future we
> may
> > have to support different syntaxes for -smp, and then add_smp()
> will
> > consult the output of 'qemu -help' and return the proper string.
> > What do you mean by function call consumption?  I don't think these
> > functions cause a measurable slowdown, and make_qemu_command() is
> called
> > very few times, so this really isn't a concern IMO.
> 
> Agreed, the wrappers are a good strategy in the case we have to
> support
> different feature sets and syntax.

I know your meaning. Yes, the wrapper is a good strategy for some parameters.
For the new added feature which could not work on old kvm, We need check support 
before using it.  So i say we need this patch. But i still think so many one line function 
is not a good code style.

For many parameters that already support by all the kvm build, I do not think 
it will have big change on syntax later.
Because a mature software should ensure the stability of the interface.
So we need not add one line function for these parameters now.
Even these parameters change its interface later, then we update the code is ok.


Again. Thanks for your patch and comments.


> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

       reply	other threads:[~2010-05-21  2:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1160970060.953181274407267225.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com>
2010-05-21  2:03 ` Feng Yang [this message]
     [not found] <1112938281.779511274257387855.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com>
2010-05-19  8:25 ` [KVM-AUTOTEST PATCH] KVM test: use command line option wrapper functions Feng Yang
2010-05-20  9:50   ` Michael Goldish
2010-05-20 10:57     ` Lucas Meneghel Rodrigues
2010-05-17 13:29 [KVM-AUTOTEST PATCH] KVM test: formatting improvements to scan_results.py Michael Goldish
2010-05-17 13:29 ` [KVM-AUTOTEST PATCH] KVM test: make use of tcpdump optional Michael Goldish
2010-05-17 13:29   ` [KVM-AUTOTEST PATCH] KVM test: use command line option wrapper functions Michael Goldish

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=1674046239.953231274407406396.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com \
    --to=fyang@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=lmr@redhat.com \
    --cc=mgoldish@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 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).