[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v1 2/5] VMState test: basic vmstate testing
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [RFC PATCH v1 2/5] VMState test: basic vmstate testing mechanism |
Date: |
Mon, 07 Jul 2014 11:33:22 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 07/07/2014 11:18 AM, Sanidhya Kashyap wrote:
> This patch introduces the mechanism to test the devices state by storing
> and dumping in in the QEMUFile pointer.
>
> The testing is done as follows:
> 1) The VM is halted.
> 2) guest state is synchronized.
> 3) Then the device state is dumped to a temporary memory.
> 4) The guest state is reset.
> 5) Then the device state is loaded from the temporary memory.
> 6) The guest is resumed.
>
> +
> +## @test-vmstates
> +#
> +# tests the vmstates' value by dumping and loading in memory
> +# @times: total iterations
Missing the #optional flag; what does it default to if not specified?
> +# @sinterval: sleep interval between iteration
in what unit? Missing the #optional flag; what does it default to if
not specified?
> +#
> +# Since 2.1
You've missed hard freeze for 2.1; this is a new feature, and at the
earliest it can only be introduced in 2.2.
> +##
> +{ 'command': 'test-vmstates',
> + 'data': {'*times' : 'int',
> + '*sinterval' : 'int' } }
> +Arguments:
> +
> +- "times" : the total iterations for vmstates testing. The default
> + value is 10.
> +- "sinterval": the sleep interval between the iterations. The default
> + value is 100 milliseconds.
Ah, you provided more documentation in the .hx file than in the .json.
I hate the redundancy, but it's better to include it in both files.
> +++ b/savevm.c
> @@ -1137,6 +1137,154 @@ void do_savevm(Monitor *mon, const QDict *qdict)
> }
> }
>
> +#ifdef DEBUG_TEST_VMSTATES
> +#define DPRINTF(fmt, ...) \
> + do { printf("vmstate_test: " fmt, ## __VA_ARGS__); } while (0)
> +#else
> +#define DPRINTF(fmt, ...) \
> + do { } while (0)
> +#endif
Wasn't there another series proposed that ensures that even when
debugging is disabled that the compiler still compiles printf*
statements under an if(0) block to prevent bit-rot? I didn't bother to
look it up now in the archives, but you should reuse that approach.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [RFC PATCH v1 0/5] VMState testing, Sanidhya Kashyap, 2014/07/07
- [Qemu-devel] [RFC PATCH v1 1/5] QEMUSizedBuffer/QEMUFile, Sanidhya Kashyap, 2014/07/07
- [Qemu-devel] [RFC PATCH v1 2/5] VMState test: basic vmstate testing mechanism, Sanidhya Kashyap, 2014/07/07
- Re: [Qemu-devel] [RFC PATCH v1 2/5] VMState test: basic vmstate testing mechanism,
Eric Blake <=
- [Qemu-devel] [RFC PATCH v1 3/5] VMState test: hmp interface for vmstate testing, Sanidhya Kashyap, 2014/07/07
- [Qemu-devel] [RFC PATCH v1 4/5] VMState test: set the frequency of the vmstate testing process, Sanidhya Kashyap, 2014/07/07
- [Qemu-devel] [RFC PATCH v1 5/5] VMState test: cancel mechanism for an already running vmstate testing process, Sanidhya Kashyap, 2014/07/07