naveen penumala wrote: > Hi... > > Here i'm using SUSE 10.1, and I tested my kernel(2.6.16.21) using latest LTP > tool. I found that inotify02 test case was failed. It never failed in my > system. I have checked in LTP mailing list and I noticed that it is failed > in older kernel when tested with the new LTP. > > can you please tell me the kernel patch file for inotify. so that I can try > in my system. Please help me regarding this. >
This one: commit 1c17d18e3775485bf1e0ce79575eb637a94494a2 Author: Yan Zheng <[EMAIL PROTECTED]> Date: Wed Feb 6 01:36:09 2008 -0800 A potential bug in inotify_user.c Following comment is at fs/inotify_user.c:287 /* coalescing: drop this event if it is a dupe of the previous */ I think the previous event in the comment should be the last event in the link list. But inotify_dev_get_event return the first event in the list. In addition, it doesn't check whether the list is empty Signed-off-by: Yan Zheng<[EMAIL PROTECTED]> Acked-by: Robert Love <[EMAIL PROTECTED]> Cc: John McCutchan <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> diff --git a/fs/inotify_user.c b/fs/inotify_user.c index 5e00933..c509a81 100644 --- a/fs/inotify_user.c +++ b/fs/inotify_user.c @@ -248,6 +248,19 @@ inotify_dev_get_event(struct inotify_device *dev) } /* + * inotify_dev_get_last_event - return the last event in the given dev's queue + * + * Caller must hold dev->ev_mutex. + */ +static inline struct inotify_kernel_event * +inotify_dev_get_last_event(struct inotify_device *dev) +{ + if (list_empty(&dev->events)) + return NULL; + return list_entry(dev->events.prev, struct inotify_kernel_event, list); +} + +/* * inotify_dev_queue_event - event handler registered with core inotify, adds * a new event to the given device * @@ -273,7 +286,7 @@ static void inotify_dev_queue_event(struct inotify_watch *w, u32 wd, u32 mask, put_inotify_watch(w); /* final put */ /* coalescing: drop this event if it is a dupe of the previous */ - last = inotify_dev_get_event(dev); + last = inotify_dev_get_last_event(dev); if (last && last->event.mask == mask && last->event.wd == wd && last->event.cookie == cookie) { const char *lastname = last->name; > 1. inotify02 FAIL 1 > inotify02 10 FAIL : get unnecessary event: wd=1 mask=800 cookie=0 > len=0name=") > > > Regards, > NVN > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list