[Libvirt-cim] [PATCH] [TEST] Add 10 seconds delay at the beginning of LogicalDisk-02_nodevs.py for Xen/XenFV
Guo Lian Yun
yunguol at cn.ibm.com
Thu Sep 11 03:11:01 UTC 2008
libvirt-cim-bounces at redhat.com wrote on 2008-09-11 04:46:16:
> > >
> > > I gave them some more thought.. adding an arbitrary sleep in a test
> > > isn't really a good idea - because systems run at varying speeds,
so you
> > > can't guarantee how long you'll need to sleep.
> > >
> > > A better approach would be to poll to see if there are no guests...
if
> > > there are no guests defined, then run the test, otherwise keep
polling.
> > > You could poll for 10 seconds or so. So something like:
> > >
> > > timer_count = 10
> > >
> > > if count < timer_count:
> > > #Get list of defined/active guests on the system
> > > #If no guests are defined
> > > break
> > > sleep(1)
> > >
> > > Does this sound reasonable?
> >
> > Agree with you.
> > If there is still define guest on the system after waiting for
> > 10 seconds, then shall we have to make the timer_count longer?
> >
>
> The problem here is that it's possible the user has other defined guests
> in the system. So we can't keep polling for there to be no guests. The
> best we can do is poll for a given amount of time. If the system still
> has guests on it after the timer is up, then we need to skip the test.
>
Done. Patch on the way.
> --
> Kaitlin Rupert
> IBM Linux Technology Center
> kaitlin at linux.vnet.ibm.com
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080911/b69c333c/attachment.htm>
More information about the Libvirt-cim
mailing list