[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 11/11] test-vmstate: add test case to verify we

From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 11/11] test-vmstate: add test case to verify we don't change VMState
Date: Tue, 22 Mar 2011 21:31:36 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8

On 03/22/2011 07:16 PM, Anthony Liguori wrote:
We've had lots of issues surrounding live migration breaking.  This is because
we haven't had a good way to validate that what we're migrating isn't changing
underneath of us.

This test works by first converting the in-tree schema to C source as a string.
This is built into the test case.  The test case will then query QEMU for the
current schema.

It converts both strings to QObjects via the JSON parser and then does a
recursive diff.  Unlike a simple diff command, this lets us say exactly what you
did to break migration.  For instance, you get error messages like:

   You broke migration by changing the type of field 'par' in device 'cpu',
   version 1 from 'uint32' to 'uint64'.

It only covers devices that support VMState and it currently doesn't look at
subsections yet.

The in-tree schema needs to be updated whenever migration changes but this ends
up being a very nice way to ensure that we're reviewing migration protocol

The test case is built in the default build, and can be run by `make check'.

This test takes a disturbingly long time to run considering what it's doing (~3 seconds). Turns out, the JSON parser is horribly slow because it allocates and frees memory faster than a hummingbird on steroids.

I have a local patch that removes this and afterwards the test runs in just 70ms. I'll send that fix out tomorrow.


Anthony Liguori

reply via email to

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