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

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



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


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