diff --git a/qemu/tests/cfg/hv_reset.cfg b/qemu/tests/cfg/hv_reset.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e05b50da0df5b8dff439c0e9e82eb6184642b01c --- /dev/null +++ b/qemu/tests/cfg/hv_reset.cfg @@ -0,0 +1,6 @@ +- hv_reset: + only Windows + type = hv_reset + start_vm = no + not_preprocess = yes + hv_flags = +kvm_pv_unhalt,hv_reset diff --git a/qemu/tests/hv_reset.py b/qemu/tests/hv_reset.py new file mode 100644 index 0000000000000000000000000000000000000000..71d104df5dbf084998bd6d978ee7e1fe121bde75 --- /dev/null +++ b/qemu/tests/hv_reset.py @@ -0,0 +1,23 @@ +from virttest import env_process + + +def run(test, params, env): + """ + Reboot test with hv_reset flag: + 1) Log into a guest + 2) Send a reboot command in guest + 3) Wait until the guest is up again + 4) Log into the guest to verify it's up again + + :param test: QEMU test object + :param params: Dictionary with the test parameters + :param env: Dictionary with test environment. + + """ + params["cpu_model_flags"] = params["hv_flags"] + params["start_vm"] = "yes" + vm_name = params["main_vm"] + env_process.preprocess_vm(test, params, env, vm_name) + vm = env.get_vm(vm_name) + vm.reboot(vm.wait_for_login(timeout=360)) + vm.verify_alive()