Instead, create a new image with backing-file of the original image
(a "permanent" snapshot), use it during the test and remove it at the end.
Also use 'writeback' cache instead of 'unsafe'.
Signed-off-by: Uri Lublin <uril@redhat.com>
squash: actually remove the snapshot. mention cache change
There is no raw_input() in python3 -- define it as input()
Use decode() when writing subprocess output to the log, to make
sure the argument for write is a string (in python3
stdout.read() returns bytes).
There is no has_key in python3 -- use "in" instead
Signed-off-by: Uri Lublin <uril@redhat.com>
Before this patch, running the test with --vdagent option would error
in the second migration attempt with:
| qemu-system-x86_64: Unknown savevm section or instance
| '0000:00:04.0/virtio-console' 0. Make sure that your current VM setup
| matches your saved VM setup, including any hotplugged devices
The reason is that target host created for migration was lacking the
configuration for vdagent that is present in the first source/target
migration VMs.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
This supports doing migration without any client to be connected.
If tester wants client, it needs to pass an option to --client.
Change of default still is to keep the test as simple as possible
when no arguments are given.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
The iterate() method already considers it. This is useful if one wants
to attach gdb on qemu for instance.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Simpler. Make the default to be False as well as
1) No args should run as simple as possible
2) True is currently broken
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Not supported feature to be tested so reduce unused/untested code for
now.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Moved in qemu, see:
| commit 8f8fd9edba4bd6768da2c8e2bea49ad5c16ced1a
| Author: Cleber Rosa <crosa@redhat.com>
| Date: Wed Feb 6 11:29:01 2019 -0500
|
| Introduce a Python module structure
|
| This is a simple move of Python code that wraps common QEMU
| functionality, and are used by a number of different tests and
| scripts.
|
| By treating that code as a real Python module, we can more easily:
| * reuse code
| * have a proper place for the module's own unittests
| * apply a more consistent style
| * generate documentation
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Adds the required options to provide a vdagent to the guest in both source and target qemu
instances.
This will be the last update of the in spice git tests directory, I've moved those tests
to the repository spice-tests. The longer term goal remains autotest integration, but since
this test (and some minor others for qemu) need a home it is:
http://cgit.freedesktop.org/~alon/spice-tests/
(I'm reluctant to put it under spice/ because of my wish to go to autotest, but still, there
they are. Nothing as permanent as the temporary).
Independent (of external modules, i.e. qemu) tests (server/tests) should remain in tree.
Most helpful change is that it prints help if you do --help.
It can take --image parameter, and --client parameter, defaults to spicy.
Incidentally, spicy switch host seems broken - if you run with --client spicec
(assuming spicec is in the PATH), it works fine, but using the default spicy (or
--client spicy) it fails after a single switch.