qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Sanidhya Kashyap <sanidhya.iiith@gmail.com>,
	qemu list <qemu-devel@nongnu.org>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH v1 2/5] VMState test: basic vmstate testing mechanism
Date: Mon, 07 Jul 2014 11:33:22 -0600	[thread overview]
Message-ID: <53BAD9E2.5050901@redhat.com> (raw)
In-Reply-To: <1404753484-26693-3-git-send-email-sanidhya.iiith@gmail.com>

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

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


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

  reply	other threads:[~2014-07-07 17:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-07 17:17 [Qemu-devel] [RFC PATCH v1 0/5] VMState testing Sanidhya Kashyap
2014-07-07 17:18 ` [Qemu-devel] [RFC PATCH v1 1/5] QEMUSizedBuffer/QEMUFile Sanidhya Kashyap
2014-07-07 18:28   ` Eric Blake
2014-07-08  7:48     ` Dr. David Alan Gilbert
2014-07-07 17:18 ` [Qemu-devel] [RFC PATCH v1 2/5] VMState test: basic vmstate testing mechanism Sanidhya Kashyap
2014-07-07 17:33   ` Eric Blake [this message]
2014-07-07 17:18 ` [Qemu-devel] [RFC PATCH v1 3/5] VMState test: hmp interface for vmstate testing Sanidhya Kashyap
2014-07-07 17:18 ` [Qemu-devel] [RFC PATCH v1 4/5] VMState test: set the frequency of the vmstate testing process Sanidhya Kashyap
2014-07-07 18:25   ` Eric Blake
2014-07-18 18:59     ` Sanidhya Kashyap
2014-07-07 17:18 ` [Qemu-devel] [RFC PATCH v1 5/5] VMState test: cancel mechanism for an already running " Sanidhya Kashyap

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=53BAD9E2.5050901@redhat.com \
    --to=eblake@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=sanidhya.iiith@gmail.com \
    /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).