Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guest_os_booting: fix the unsupported version issues #5001

Merged
merged 1 commit into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
loader_dict = {'loader': '${loader_path}', 'nvram': '${nvram_path}', 'nvram_attrs': {'template': '${nvram_template}'}, 'secure': 'no', 'loader_readonly': 'yes', 'loader_type': 'pflash'}
- stateless_yes:
stateless = "yes"
func_supported_since_libvirt_ver = (8, 6, 0)
loader_path = "/usr/share/edk2/ovmf/OVMF.amdsev.fd"
loader_dict = {'os_firmware': 'efi', 'loader_stateless': 'yes'}
loader_xpath = [{'element_attrs': ["./os/loader[@stateless='yes']"], 'text': '${loader_path}'}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import os

from virttest import libvirt_version
from virttest import virsh
from virttest.libvirt_xml import vm_xml
from virttest.utils_libvirt import libvirt_vmxml
Expand All @@ -31,6 +32,7 @@ def run(test, params, env):
incorrect_loader_path = params.get("incorrect_loader_path", "")
use_file = "yes" == params.get("use_file", "no")
stateless = "yes" == params.get("stateless", "no")
libvirt_version.is_libvirt_feature_supported(params)

vm = env.get_vm(vm_name)
vmxml = vm_xml.VMXML.new_from_inactive_dumpxml(vm_name)
Expand Down
2 changes: 1 addition & 1 deletion provider/guest_os_booting/guest_os_booting_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def check_vm_startup(vm, vm_name, error_msg):
:params vm: vm object
:params vm_name: the name of guest
"""
ret = virsh.start(vm_name, "--reset-nvram", timeout=30, debug=True)
ret = virsh.start(vm_name, timeout=30, debug=True)
vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name)
libvirt.check_result(ret, expected_fails=error_msg)
if not error_msg:
Expand Down