qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amos Kong <akong@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: libvir-list@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [libvirt] [PATCH v3 2/2] query-command-line-options: query all the options in qemu-options.hx
Date: Thu, 6 Mar 2014 10:32:55 +0800	[thread overview]
Message-ID: <20140306023255.GA7829@amosk.info> (raw)
In-Reply-To: <531771EE.2000309@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3323 bytes --]

On Wed, Mar 05, 2014 at 11:50:22AM -0700, Eric Blake wrote:
> On 03/05/2014 08:58 AM, Eric Blake wrote:
> > On 03/04/2014 11:40 PM, Amos Kong wrote:
> > 
> >>> but the docs imply that I should now see:
> >>>
> >>> {"parameters": [], "option": "smbios", "argument": true}
> >>
> >> I really got : {"parameters": [], "option": "smbios", "argument": true}
> >>
> >> (I was testing with latest qemu upstream + my patches, attached the
> >> output file)
> > 
> > Hmm, maybe I was testing a stale binary.  Let me try re-running tests on
> > my end - I recently changed my choice of configure arguments to speed up
> > build time by building fewer binaries, so maybe I tested on a binary
> > that my configure arguments no longer rebuild.
> 
> Aha, it WAS my configure options at fault.  Apologies for the mis-test
> on my side.  I can now confirm that pre-patch, I see (rearranged a
> subset of entries, and newlines added for legibility):
> 
> {"parameters": [], "option": "smbios"},
> {"parameters": [{"name": "file", "type": "string"},
>    {"name": "events", "type": "string"}], "option": "trace"},
> 
> and no fips, while post-patch, I see:
> 
> {"parameters": [], "option": "enable-fips", "argument": false},
> {"parameters": [], "option": "smbios", "argument": true},
> {"parameters": [{"name": "file", "type": "string"},
>    {"name": "events", "type": "string"}], "option": "trace"},
> 
> which matches the docs.  However, I did notice that pre-patch, I see:
> 
> {"parameters": [], "option": "acpi"}
> 
> while post-patch, there is no hit for "acpi", but there is a new:
> 
> {"parameters": [], "option": "acpitable", "argument": true}
> 
> What's going on there?  It is a potential regression if we fail to list
> an option post-patch that was listed pre-patch.  Then again, looking at
> the actual -help text, I see my particular qemu binary mentions only
> "-acpitable [sig=str]..." in the help text (pre- and post-patch), as
> well as this test to prove there is no '-acpi':
> 
> $ ./x86_64-softmmu/qemu-system-x86_64 -acpi
> qemu-system-x86_64: -acpi: invalid option
> $ ./x86_64-softmmu/qemu-system-x86_64 -acpitable
> qemu-system-x86_64: -acpitable: requires an argument
> 
> so it looks like your patch was silently fixing a bug.  Indeed, reading
> vl.c, I see:
> 
>             case QEMU_OPTION_acpitable:
>                 opts = qemu_opts_parse(qemu_find_opts("acpi"), optarg, 1);
>                 if (!opts) {
>                     exit(1);
>                 }
>                 do_acpitable_option(opts);
> 
> so the option table named "acpi" is indeed for the command line argument
> "acpitable".

Can we update all the name in option tables to match with actual
command-line spelling? (we can use another patch to fix it)
 
> It would be nice to mention bonus bug fixes like that in the commit
> message (that is, you are not only adding support for flags like
> -enable-fips, you are also fixing options to match their actual
> command-line spelling rather than an alternate name associated with the
> option table in use by the command).
> 
> So, at this point, we still need a v4 to avoid the duplicate static
> tables, but I am now set up to give a Tested-by.

Thanks for your confirm, I will post a V4.

-- 
			Amos.

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2014-03-06  2:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04  5:51 [Qemu-devel] [PATCH v3 0/2] fix query-command-line-options Amos Kong
2014-03-04  5:51 ` [Qemu-devel] [PATCH v3 1/2] qmp: rename query_option_descs() to get_param_infolist() Amos Kong
2014-03-04 21:17   ` Eric Blake
2014-03-04  5:51 ` [Qemu-devel] [PATCH v3 2/2] query-command-line-options: query all the options in qemu-options.hx Amos Kong
2014-03-04 22:03   ` Eric Blake
2014-03-05  6:40     ` Amos Kong
2014-03-05 15:58       ` Eric Blake
2014-03-05 18:50         ` [Qemu-devel] [libvirt] " Eric Blake
2014-03-06  2:32           ` Amos Kong [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=20140306023255.GA7829@amosk.info \
    --to=akong@redhat.com \
    --cc=eblake@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=pbonzini@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).