qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 00/18] migration: add static analysis tool to


From: Juan Quintela
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Amit Shah <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]