All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: "qemu list" <qemu-devel@nongnu.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Alexander Graf" <agraf@suse.de>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v4 00/18] migration: add static analysis tool to check vmstate compat
Date: Wed, 18 Jun 2014 12:49:21 +0200	[thread overview]
Message-ID: <87ha3iijbi.fsf@troll.troll> (raw)
In-Reply-To: <cover.1403079139.git.amit.shah@redhat.com> (Amit Shah's message of "Wed, 18 Jun 2014 13:43:34 +0530")

Amit Shah <amit.shah@redhat.com> wrote:
> Hello,
>
> v4:
>  - Return value capped to 255 to prevent wrap-around (Eric Blake)
>
> v3:
>  - Python script returns an error code: 0 if no errors, positive for
>    the number of errors identified.
>
> v2:
>  - Tabs->spaces (Dave Gilbert)
>  - Several changes to the python script to make it more python-like
>    (Vitaly Kuznetsov)
>  - Don't store the empty fields created by VMSTATE_VALIDATE in the
>    json output
>
> This series adds a static vmstate checker to check for breakage of
> live migration by analyzing the vmstate information between different
> QEMU versions.
>
> In patch 1, QEMU is modified to add a -dump-vmstate commandline
> option, which takes a filename as the argument.  When invoked, QEMU
> dumps the vmstate info in JSON format for the current machine type to
> the file.  This patch is loosely based on a version from Andreas
> Färber.
>
> This JSON file is then fed into the Python script introduced in patch
> 2.  The script takes 'src' and 'dest' arguments, indicating the
> direction of migration.  The script then performs a series of checks
> and spews out information on inconsistencies it finds in the data.
>
> Two stripped-down versions of JSON dumps are included in this
> patchset (patch 3).
>
> Patches 4 - 18 contain modifications to those dumps, to show the
> checks that are performed by the script.  The result of running the
> script against the final version of those files is appended below.
>
> The checks are to be performed for a particular machine type, and
> comparing different machine types is bound to turn up false-positives:
> e.g.
>
> (in a qemu 2.0 tree):
> ./x86_64-softmmu/qemu-system-x86_64 -dump-vmstate qemu-2.0.json
>
> (in a qemu 2.2 tree:)
> ./x86_64-softmmu/qemu-system-x86_64 -dump-vmstate -M pc-i440fx-2.0 \
>    qemu-2.2-m2.0.json
>
> ./scripts/vmstate-static-checker.py -s qemu-2.0.json -d qemu-2.2-m2.0.json
>
> should not show any output.

This usage should go at the beggining of the script or somewhere at Documantion/

> The idea is to include this script in 'make check', ensuring new
> commits don't break migration.

Can we add this as:

make check-vmstate-sections or whatever, and then we can discuss later
if integrate it on make check or not?

I would assume something like:
- dump things on qemu-2.0 (yes, need to be done by hand applying the
  first patch)
- dump things on current qemu as qemu-2.1, qemu-2.0.95 or whatever
- check what changed from 2.0 and form last saved from 2.1, so we can
  commit the changes that we are happy with and reverse the ones that we
  are not happy with

Makes sense?

Thanks, Juan.

  parent reply	other threads:[~2014-06-18 10:49 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18  8:13 [Qemu-devel] [PATCH v4 00/18] migration: add static analysis tool to check vmstate compat Amit Shah
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 01/18] migration: dump vmstate info as a json file for static analysis Amit Shah
2014-06-18 10:24   ` Juan Quintela
2014-06-18 10:36     ` Amit Shah
2014-06-18 10:56       ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 02/18] vmstate-static-checker: script to validate vmstate changes Amit Shah
2014-06-18 10:44   ` Juan Quintela
2014-06-18 10:58     ` Amit Shah
2014-06-18 11:25       ` Juan Quintela
2014-06-18 11:32         ` Amit Shah
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 03/18] tests: vmstate static checker: add dump1 and dump2 files Amit Shah
2014-06-18 10:33   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 04/18] tests: vmstate static checker: incompat machine types Amit Shah
2014-06-18 10:33   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 05/18] tests: vmstate static checker: add version error in main section Amit Shah
2014-06-18 10:33   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 06/18] tests: vmstate static checker: version mismatch inside a Description Amit Shah
2014-06-18 10:34   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 07/18] tests: vmstate static checker: minimum_version_id check Amit Shah
2014-06-18 10:34   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 08/18] tests: vmstate static checker: remove a section Amit Shah
2014-06-18 10:35   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 09/18] tests: vmstate static checker: remove a field Amit Shah
2014-06-18 10:35   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 10/18] tests: vmstate static checker: remove last field in a struct Amit Shah
2014-06-18 10:36   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 11/18] tests: vmstate static checker: change description name Amit Shah
2014-06-18 10:36   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 12/18] tests: vmstate static checker: remove Fields Amit Shah
2014-06-18 10:36   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 13/18] tests: vmstate static checker: remove Description Amit Shah
2014-06-18 10:37   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 14/18] tests: vmstate static checker: remove Description inside Fields Amit Shah
2014-06-18 10:37   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 15/18] tests: vmstate static checker: remove a subsection Amit Shah
2014-06-18 10:37   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 16/18] tests: vmstate static checker: remove Subsections Amit Shah
2014-06-18 10:38   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 17/18] tests: vmstate static checker: add substructure for usb-kbd for hid section Amit Shah
2014-06-18 10:38   ` Juan Quintela
2014-06-18  8:13 ` [Qemu-devel] [PATCH v4 18/18] tests: vmstate static checker: add size mismatch inside substructure Amit Shah
2014-06-18 10:38   ` Juan Quintela
2014-06-18 10:49 ` Juan Quintela [this message]
2014-06-18 11:02   ` [Qemu-devel] [PATCH v4 00/18] migration: add static analysis tool to check vmstate compat Amit Shah

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=87ha3iijbi.fsf@troll.troll \
    --to=quintela@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.