qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Amos Kong <akong@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: Wed, 05 Mar 2014 11:50:22 -0700	[thread overview]
Message-ID: <531771EE.2000309@redhat.com> (raw)
In-Reply-To: <53174994.4010606@redhat.com>

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

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".

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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2014-03-05 18:50 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         ` Eric Blake [this message]
2014-03-06  2:32           ` [Qemu-devel] [libvirt] " Amos Kong

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=531771EE.2000309@redhat.com \
    --to=eblake@redhat.com \
    --cc=akong@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).