]> git.proxmox.com Git - mirror_qemu.git/commit
vmstate-static-checker: script to validate vmstate changes
authorAmit Shah <amit.shah@redhat.com>
Fri, 20 Jun 2014 13:26:09 +0000 (18:56 +0530)
committerJuan Quintela <quintela@redhat.com>
Mon, 23 Jun 2014 17:14:51 +0000 (19:14 +0200)
commit426d1d016a494c978a513afcd03aa000fcbd5b3c
treecd1dde40740e25714f670da3226fdce72de03a79
parentabfd9ce341ec66eb2e63756b9da43f77c054788e
vmstate-static-checker: script to validate vmstate changes

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.

Example:

(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

The script also takes a --reverse parameter to switch the src and dest
jsons.  This is just a shorthand for reversing the src and dest.

The --help parameter shows usage information.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
scripts/vmstate-static-checker.py [new file with mode: 0755]