From: Amit Shah <amit.shah@redhat.com>
To: Juan Quintela <quintela@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 16:32:40 +0530 [thread overview]
Message-ID: <20140618110240.GM29732@grmbl.mre> (raw)
In-Reply-To: <87ha3iijbi.fsf@troll.troll>
On (Wed) 18 Jun 2014 [12:49:21], Juan Quintela wrote:
> 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/
I've mentioned it in words instead of direct example; but sure I will
add it to the commit msg.
> > 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?
Yes, makes sense.
> 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
I'm thinking each 'git push' gets us a upstream.json file somewhere,
so a 'make check' or 'make check-vmstate-sections' as you suggest
above compares against the current upstream, so the script flags any
breakage in this patch series (assuming 'make check' is run on top of
a patch series against origin/master).
If all goes according to plan (TM), we will never have a situation
where we commit stuff and then have to revert it -- because things
will be flagged in 'make check' before any push operation.
Amit
prev parent reply other threads:[~2014-06-18 11:02 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 ` [Qemu-devel] [PATCH v4 00/18] migration: add static analysis tool to check vmstate compat Juan Quintela
2014-06-18 11:02 ` Amit Shah [this message]
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=20140618110240.GM29732@grmbl.mre \
--to=amit.shah@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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).