autotest/virt-test — pull request #597 by FengYang (2013-07-04 11:21:31+00:00)
Title: qemu.qemu_vm: spice related bug fix.

This patch fix several spice related script issue.

1.
19:20:54 ERROR| Original Traceback (most recent call last):
File "/usr/code/autotest/client/tests/virt/virttest/qemu_vm.py", line 2240, in create
self.devices = self.make_create_command()
File "/usr/code/autotest/client/tests/virt/virttest/qemu_vm.py", line 1916, in make_create_command
cmd += add_spice()
File "/usr/code/autotest/client/tests/virt/virttest/qemu_vm.py", line 1034, in add_spice
if (not os.path.exists(prefix) and
File "/usr/lib64/python2.6/genericpath.py", line 18, in exists
st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

2.
Traceback (most recent call last):
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 426, in _exec
_call_test_function(self.execute, *p_args, **p_dargs)
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 853, in _call_test_function
raise error.UnhandledTestFail(e)
UnhandledTestFail: Unhandled KeyError: 'spice_port' [context: migrating 'virt-tests-vm1']
Traceback (most recent call last):
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 846, in _call_test_function
return func(*args, **dargs)
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 299, in execute
postprocess_profiled_run, args, dargs)
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 216, in _call_run_once
*args, **dargs)
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 322, in run_once_profiling
self.run_once(*args, **dargs)
File "/root/ypu/autotest_upstream_master/client/tests/virt/virt.py", line 133, in run_once
run_func(self, params, env)
File "/root/ypu/autotest_upstream_master/client/tests/virt/qemu/tests/timedrift_with_migration.py", line 59, in run_timedrift_with_migration
vm.migrate()
File "/root/ypu/autotest_upstream_master/client/shared/error.py", line 138, in new_fn
return fn(*args, **kwargs)
File "/root/ypu/autotest_upstream_master/client/tests/virt/virttest/qemu_vm.py", line 3149, in migrate
dest_port = clone.spice_options['spice_port']
KeyError: 'spice_port'

3.
simple the way to send spice related human/qmp monitor in vm.migrate().

Signed-off-by: Feng Yang