* On 2012-08-20 20:22:28 -0300, Lucas Meneghel Rodrigues ([email protected])
wrote:
> Although 52f94e55 is a laudable idea, the pattern
> "boot=on\|off" is nowhere to be found on RHEL 5 monitor
> output, making RHEL5 virtio guests to not boot. So,
> in addition of verifying the pattern, we should also
> verify if we passed image_boot_image1 = yes or similar
> in the config file, and if so, then set boot=on for that
> particular image.
>
> Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
> ---
> client/virt/kvm_vm.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py
> index 4589475..566924d 100644
> --- a/client/virt/kvm_vm.py
> +++ b/client/virt/kvm_vm.py
> @@ -550,7 +550,7 @@ class VM(virt_vm.BaseVM):
> cmd += _add_option("werror", werror)
> cmd += _add_option("serial", serial)
> cmd += _add_option("snapshot", snapshot, bool)
> - if has_option(help, "boot=on\|off"):
> + if has_option(help, "boot=on\|off") or boot in ['yes', 'on',
> True]:
Oh, I guess my previous patch has bug, the has_option() only check
'-foobar' format option, but the 'boot=on|off' is in the argument list
of '-drive' option:
"""
# /usr/libexec/qemu-kvm -h|grep -B3 "boot=on|off"
-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]
[,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]
[,cache=writethrough|writeback|none|unsafe][,format=f][,serial=s]
[,boot=on|off][,readonly=on|off]
"""
(I'm sorry for made this mistake. )
So, this `if` sentence needs to change to:
if bool(re.search("boot=on\|off", help, re.M)):
> cmd += _add_option("boot", boot, bool)
> cmd += _add_option("id", name)
> cmd += _add_option("readonly", readonly, bool)
> --
> 1.7.11.4
>
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel