<br><tt><font size=2>libvirt-cim-bounces@redhat.com wrote on 2008-09-09
23:44:15:<br>
<br>
> > diff -r 8abcd820b6b3 -r 25c48331735e suites/libvirt-<br>
> cim/cimtest/LogicalDisk/02_nodevs.py<br>
> > --- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py  
Fri <br>
> Sep 05 02:47:24 2008 -0700<br>
> > +++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py  
Mon <br>
> Sep 08 23:22:54 2008 -0700<br>
> > @@ -25,6 +25,7 @@<br>
> > <br>
> >  import sys<br>
> >  import pywbem<br>
> > +from time import sleep<br>
> >  from VirtLib import live<br>
> >  from XenKvmLib import devices<br>
> >  from CimTest.Globals import logger, CIM_ERROR_ENUMERATE<br>
> > @@ -53,7 +54,8 @@ def main():<br>
> >      if not clean_system(options.ip, options.virt):<br>
> >          logger.error("System has
defined domains; unable to run")<br>
> >          return SKIP<br>
> > -<br>
> > +    if options.virt == 'Xen' or options.virt == 'XenFV':<br>
> > +        sleep(10)<br>
> >      key_list = ["DeviceID", "CreationClassName",
"SystemName", <br>
> >                  "SystemCreationClassName"]<br>
> <br>
> I gave them some more thought.. adding an arbitrary sleep in a test
<br>
> isn't really a good idea - because systems run at varying speeds,
so you <br>
> can't guarantee how long you'll need to sleep.<br>
> <br>
> A better approach would be to poll to see if there are no guests...
if <br>
> there are no guests defined, then run the test, otherwise keep polling.
<br>
>   You could poll for 10 seconds or so.  So something like:<br>
> <br>
> timer_count = 10<br>
> <br>
> if count < timer_count:<br>
>    #Get list of defined/active guests on the system<br>
>    #If no guests are defined<br>
>        break<br>
>    sleep(1)<br>
> <br>
> Does this sound reasonable?</font></tt>
<br>
<br><tt><font size=2>  Agree with you. </font></tt>
<br><tt><font size=2>  If there is still define guest on the system
after waiting for</font></tt>
<br><tt><font size=2>  10 seconds, then shall we have to make the
timer_count longer?</font></tt>
<br>
<br><tt><font size=2>  Thanks!<br>
> <br>
> -- <br>
> Kaitlin Rupert<br>
> IBM Linux Technology Center<br>
> kaitlin@linux.vnet.ibm.com<br>
> <br>
> _______________________________________________<br>
> Libvirt-cim mailing list<br>
> Libvirt-cim@redhat.com<br>
> https://www.redhat.com/mailman/listinfo/libvirt-cim<br>
</font></tt>