On 07/26/2012 06:38 PM, Yu Mingfei wrote:
>> +def run_virsh_domname(test, params, env):
>> +    """
>> +    Test command: virsh domname<id/uuid>.
>> +
>> +    There are 26 testcases, list by its type:
>> +    1) test valid options.(2)
>> +    2) test invalid options.(6)
>> +    3) test valid options with vm paused.(2)
>> +    4) test invalid options with vm paused.(6)
>> +    5) test valid options with vm shut_off.(2)
>> +    6) test invalid options with vm shut_off.(6)
>>
>>
>> I remembered I have ever sent a simple example from libvirt upstream 
>> to you,
>> you may use id and uuid to get VM's name then compare whether they 
>> are the
>> same name.
>>
>> Alex
>>
> Yes, this is a way to test whether domname is ok.
> But what we need are a seials of testcases to test virsh command domname.
> Our way compares what we know and what we get from domanme command.

Your way is okay for me, I just want to test 'virsh id' and 'virsh uuid' 
together.

>
>>
>> +    7) test valid options with libvirtd stop.(2)
>> +    """
>> +    vm_name = params.get("main_vm", "vm1")
>> +    vm = env.get_vm(params["main_vm"])
>> +    if not vm.is_alive():
>> +        vm.start()
>> +        time.sleep(5)
>> +
>> +    pre_vm_state = params.get("pre_vm_state", "running")
>> +    if pre_vm_state == "shut off":
>> +        vm.destroy()
>> +        time.sleep(2)
>
>

_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to