>> + # Prepare libvirtd service
>> + check_libvirtd = params.has_key("libvirtd")
>> + if check_libvirtd:
>> + libvirtd = params.get("libvirtd")
>> + if libvirtd == "off":
>> + libvirt_vm.service_libvirtd_control("stop")
>> +
>> + # Run test case
>> + option = params.get("options")
>> + check_target_uri = params.has_key("target_uri")
>> + if check_target_uri:
>> + target_uri = params.get("target_uri")
>> + cmd = "virsh -c %s uri" % target_uri
>> + else:
>> + cmd = "virsh uri %s" % option
>> +
>> + status, uri_test = virsh_uri(cmd)
>> +
>> + # Recover libvirtd service start
>> + if libvirtd == "off":
>> + libvirt_vm.service_libvirtd_control("start")
>> +
>> + # Check status_error
>> + status_error = params.get("status_error")
>> + if status_error == "yes":
>> + if status == 0:
>> + raise error.TestFail("Command 'virsh uri %s' succeeded "
>> + "(incorrect command)" % option)
> We probably need also to record some expected errors case, for example:
> else:
> logging.info("xxxxxxxxxxx This is a expected error xxxxxxxx")

  Followed,thanks!
>> + elif status_error == "no":
>> + if cmp(target_uri, uri_test) != 0:
>> + raise error.TestFail("Virsh cmd gives wrong uri.")
>> + if status != 0:
>> + raise error.TestFail("Command 'virsh uri %s' failed "
>> + "(correct command)" % option)
> elif status == 0:
> logging.info("xxxxxx succeed to run xxxxxxxxx")
> 
> I found we haven't any 'info' information is written into 
> debug/xxxx.xxx.xxxx.INFO.
  
 I got it,thanks!
 
> 
> Others are fine for me.
> 
> Thanks,
> Alex
>> -- 
>> 1.7.1
>>
>> _______________________________________________
>> Autotest mailing list
>> [email protected]
>> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
> 
> 
> 

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to