Re: [PATCH 09/20] qemumonitortestutils: Split up creation of the test to allow reuse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/30/13 16:00, Eric Blake wrote:
> On 07/30/2013 07:05 AM, Peter Krempa wrote:
>> The instrumentation for the monitor test can be hacked for qemu agent
>> testing. Split out the monitor specific stuff to allow using the code in
>> guest agent tests in the future.
>> ---
>>   tests/qemumonitortestutils.c | 96 ++++++++++++++++++++++++++++++--------------
>>   1 file changed, 66 insertions(+), 30 deletions(-)
>>
>> diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c
>> index 5ca569f..1785293 100644
>> --- a/tests/qemumonitortestutils.c
>> +++ b/tests/qemumonitortestutils.c
>> @@ -440,16 +440,11 @@ static qemuMonitorCallbacks qemuCallbacks = {
>>   };
>>
>>
>> -#define QEMU_JSON_GREETING "{\"QMP\": {\"version\": {\"qemu\": {\"micro\": 1, \"minor\": 0, \"major\": 1}, \"package\": \" (qemu-kvm-1.0.1)\"}, \"capabilities\": []}}"
> 
> Ah, as long as you are refactoring here, you don't have to tweak the
> earlier patch in the series where I suggested breaking the long line.
> 
>>
>> +#define QEMU_JSON_GREETING "{\"QMP\": {\"version\": {\"qemu\": {\"micro\": 1, \"minor\": 0, \"major\": 1}, \"package\": \" (qemu-kvm-1.0.1)\"}, \"capabilities\": []}}"

I changed the line to:

+#define QEMU_JSON_GREETING  "{\"QMP\":"\
+                            "   {\"version\":"\
+                            "       {\"qemu\":"\
+                            "           {\"micro\": 1,"\
+                            "            \"minor\": 0,"\
+                            "            \"major\": 1"\
+                            "           },"\
+                            "        \"package\": \"(qemu-kvm-1.0.1)"\
+                            "       \"},"\
+                            "    \"capabilities\": []"\
+                            "   }"\
+                            "}"
 /* We skip the normal handshake reply of "{\"execute\":\"qmp_capabilities\"}" */

 #define QEMU_TEXT_GREETING "QEMU 1.0,1 monitor - type 'help' for more information"

and verified that it still builds and tests run successfully.

Peter

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]