提交 87863f11 编写于 作者: Q Qingtang Zhou 提交者: Lucas Meneghel Rodrigues

qemu.tests.cdrom: Rename get_cdrom_device

Rename this function to get_empty_cdrom_device, to make its name
match what it does.
Signed-off-by: NQingtang Zhou <qzhou@redhat.com>
上级 7332f377
......@@ -239,8 +239,10 @@ def run_cdrom(test, params, env):
return pid.group(1)
def get_cdrom_device(vm):
"""Get cdrom device when cdrom is not insert."""
def get_empty_cdrom_device(vm):
"""
Get cdrom device when cdrom is not insert.
"""
device = None
blocks = vm.monitor.info("block")
if isinstance(blocks, str):
......@@ -298,7 +300,7 @@ def run_cdrom(test, params, env):
logging.debug("cdrom_dev_list: %s", cdrom_dev_list)
if params.get('not_insert_at_start') == "yes":
error.context("Locked without media present", logging.info)
device = get_cdrom_device()
device = get_empty_cdrom_device()
cdrom_dev = cdrom_dev_list[0]
if vm.check_block_locked(device):
raise error.TestFail("Device should not be locked just after "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册