[libvirt] [PATCH v6 01/13] qemu: Add QEMU 2.10 x86_64 the generated capabilities

John Ferlan jferlan at redhat.com
Thu Aug 31 11:38:53 UTC 2017



On 08/31/2017 03:56 AM, Peter Krempa wrote:
> On Wed, Aug 30, 2017 at 18:46:01 -0400, John Ferlan wrote:
>> For reference, these were generated by updating a local qemu git
>> repository to the latest upstream and building in order to generate
>> an "x86_64-softmmu/qemu-system-x86_64" image.
>>
>> The image was then provided as input:
>>
>>     tests/qemucapsprobe /path/to/x86_64-softmmu/qemu-system-x86_64 > \
>>        tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies
>>
>> The image was then used in a test domain as the emulator and the
>> domain started using a "top of tree" build running libvirtd which
>> generates an XML file in /var/cache/libvirt/qemu/capabilities/.
>> I search the cache for 2.10:
>>
>>     grep 2.10 /var/cache/libvirt/qemu/capabilities/*.xml
>>
>> and copied the resulting xml file to
>>
>>     tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
>>
>> scrubbed the file slightly to set qemuctime, selfctime, and
>> selfvers to 0 and change the package to add a "-dirty".
> 
> Way simpler approach is to:
> 
> 1) move the replies to correct location + add the entry
> 2) touch tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
> 3) VIR_TEST_REGENERATE_OUTPUT=1 ./tests/qemucapabilitiestest
> 

Thanks! I'll change the commit message for this second part since I'm
sure to forget the next time I'd have to do something like this!

Should I update the comment in tests/qemucapabilitiestest.c to include
this step too? e.g.:

    /*
     * Run "tests/qemucapsprobe /path/to/qemu/binary >foo.replies"
     * to generate updated or new *.replies data files. Then run
     * "VIR_TEST_REGENERATE_OUTPUT=1 ./tests/qemucapabilitiestest"
     * once the tests/qemucapabilitiesdata/caps_*.replies file is in
     * place to create the tests/qemucapabilitiesdata/caps_*.xml file.
     */

Assuming someone actually reads it ;-)

John

>>
>> Signed-off-by: John Ferlan <jferlan at redhat.com>
>> ---
>>
>>  This is new from v5 - since VxHS was added to qemu 2.10 and we
>>  don't have qemu 2.10 definitions yet, in order to properly add
>>  the capabilities checks, we need the environment set up.
>>
>>  .../caps_2.10.0.x86_64.replies                     | 17994 +++++++++++++++++++
>>  tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml  |   791 +
>>  tests/qemucapabilitiestest.c                       |     1 +
>>  3 files changed, 18786 insertions(+)
>>  create mode 100644 tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies
>>  create mode 100644 tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
>>
>> diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies
>> new file mode 100644
>> index 0000000..08a33ab
>> --- /dev/null
>> +++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.replies
>> @@ -0,0 +1,17994 @@
>> +{
>> +  "QMP": {
>> +    "version": {
>> +      "qemu": {
>> +        "micro": 94,
>> +        "minor": 9,
>> +        "major": 2
>> +      },
>> +      "package": " (v2.10.0-rc4-dirty)"
> 
> What changes do you have on top of rc4?
> 




More information about the libvir-list mailing list