qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 02/18] vmstate-static-checker: script to validate vmstate changes
Date: Wed, 18 Jun 2014 16:28:22 +0530	[thread overview]
Message-ID: <20140618105822.GL29732@grmbl.mre> (raw)
In-Reply-To: <87lhsuijk3.fsf@troll.troll>

On (Wed) 18 Jun 2014 [12:44:12], Juan Quintela wrote:
> Amit Shah <amit.shah@redhat.com> wrote:
> > This script compares the vmstate dumps in JSON format as output by QEMU
> > with the -dump-vmstate option.
> >
> > It flags various errors, like version mismatch, sections going away,
> > size mismatches, etc.
> >
> > This script is tolerant of a few changes that do not change the on-wire
> > format, like embedding a few fields within substructs.
> >
> > The script takes -s/--src and -d/--dest parameters, to which filenames
> > are given as arguments.
> >
> > Signed-off-by: Amit Shah <amit.shah@redhat.com>
> 
> 
> 
> > +def check_fields_match(s_field, d_field):
> > +    if s_field == d_field:
> > +        return True
> > +
> > +    # Some fields changed names between qemu versions.  This list
> > +    # is used to whitelist such changes.
> > +    changed_names = [
> > +                     ['d', 'dev', 'pcidev', 'pci_dev', 'parent_obj'],
> > +                     ['card', 'parent_obj'],
> > +                     ['bridge.dev', 'parent_obj'],
> > +                     ['br.dev', 'parent_obj.parent_obj'],
> > +                     ['port.br.dev', 'parent_obj.parent_obj.parent_obj'],
> > +                     ['port.br.dev.exp.aer_log',
> > +                      'parent_obj.parent_obj.parent_obj.exp.aer_log'],
> > +                     ['br.dev.exp.aer_log',
> > +                      'parent_obj.parent_obj.exp.aer_log'],
> > +                     ['shpc', 'bridge.dev.shpc'],
> > +                     ['pci0_status',
> > +                      'acpi_pci_hotplug.acpi_pcihp_pci_status[0x0]'],
> > +                     ['pci_irq_levels', 'pci_irq_levels_vmstate'],
> > +                     ['usb-ptr-queue', 'HIDPointerEventQueue'],
> > +                     ['num_surfaces', 'ssd.num_surfaces'],
> > +                     ['timer', 'timer_expiry'],
> > +                    ]
> 
> I expect this not to be very big, so ... could we prepend the VMState
> description name on this?
> 
> "usb-ptr-queue" and "HIDPointerEventQueue" are quite descriptive, but
> 
> "d" "dev" "pci_dev" ...
> 
> I am not sure that we want to do this translation for any
> VMSTateDescription.  In particular, we are ending that parent_obj can
> match with anything :-()

Hm; so a 1-1 mapping of stuff that changed.  A similar mapping will
have to be created for all vmsds.

I'll take a look at it.

Do you want to hold off this series till that, or should I just send a
follow-up patch (series) once I get something?

> My python is rusty (to be generous with me), so I am assuming rest of
> things are idiomatic Python O:-)

Heh, I'm hoping so too -- I'm learning python on-the-go with this
script.


		Amit

  reply	other threads:[~2014-06-18 10:58 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 [this message]
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

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=20140618105822.GL29732@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).