提交 71329cde 编写于 作者: L Lukáš Doktor

qemu.tests.multi_disk_random_hotplug: raise exception if no disks added

With incorrect configuration it might happen that no disks can be added.
Throw exception instead of simple warning and clean test run.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 25f46c4f
......@@ -127,6 +127,9 @@ def run(test, params, env):
while i < no_disks:
# Set the format
if len(formats) < 1:
if i == 0:
raise error.TestError("Fail to add any disks, probably bad "
"configuration.")
logging.warn("Can't create desired number '%s' of disk types "
"'%s'. Using '%d' no disks.", no_disks,
_formats, i)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册