Re: [gamin] Test suite problems



On Mon, 2005-08-01 at 17:14 -0400, Daniel Veillard wrote:
> On Mon, Aug 01, 2005 at 04:11:45PM -0400, John McCutchan wrote:
> > Yo,
> > 
> > dnotify4.py is broken. The test creates a file, then watches it as a
> > directory, and expects to get a DELETED event. This is screwy. What
> > should happen is that the monitor fails. 
> 
>  it is the expected behaviour from the applications at this point.

What applications expect to be able to watch a directory as a file?

> 
> > 
> > Also the flood tests are broken by design. They rely on very specific
> > timing information, which depending on system load can change.
> 
>   They worked fine until now on dnotify and inotify back-ends. They
> reflect potential application expectations. Maybe those are not
> reasonnable but if the test must be changed that need to be discussed 
> beforehand not after the commit breaking them.

They worked fine on _your_ machine under your load. Many of the tests
(especially the flood tests) are racey. When you are testing for flood,
you expect a certain number of write events within the test time. But if
load is high, the write thread might not get scheduled in the way your
test assumes, and the number of events will be off.

Also, looking at the dnotify kernel code and considering the DELETE
event. There is nothing that guarantees that by the time you receive the
DELETE event in gam_server the file will actually be removed from the
directory tree. There is a race there, and your test code depends on
that race working out the way it usually does.

-- 
John McCutchan <ttb tentacle dhs org>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]