Hi Li

On Tue, Aug 26, 2008 at 12:06 PM, Li Zefan <[EMAIL PROTECTED]> wrote:
> Michael Kerrisk wrote:
>> Hi Li,
>>
>> On Tue, Aug 26, 2008 at 10:38 AM, Li Zefan <[EMAIL PROTECTED]> wrote:
>>>> on 2.6.23  kernel on Mips and i686 arch.
>>>>
>>> ...
>>>> -bash-3.2# ./inotify02
>>>>
>>>>  inotify02    1  PASS  :  get event: wd=1 mask=40000004 cookie=0 len=0
>>>> name=""
>>>> inotify02    2  PASS  :  get event: wd=1 mask=100 cookie=0 len=16
>>>> name="test_file1"
>>>> inotify02    3  PASS  :  get event: wd=1 mask=20 cookie=0 len=16
>>>> name="test_file1"
>>>> inotify02    4  PASS  :  get event: wd=1 mask=8 cookie=0 len=16
>>>> name="test_file1"
>>>> inotify02    5  PASS  :  get event: wd=1 mask=40 cookie=23 len=16
>>>> name="test_file1"
>>>> inotify02    6  PASS  :  get event: wd=1 mask=80 cookie=23 len=16
>>>> name="test_file2"
>>>> inotify02    7  PASS  :  get event: wd=1 mask=800 cookie=0 len=0 name=""
>>>> inotify02    8  PASS  :  get event: wd=1 mask=200 cookie=0 len=16
>>>> name="test_file2"
>>>> inotify02    9  PASS  :  get event: wd=1 mask=800 cookie=0 len=0 name=""
>>>> inotify02   10  FAIL  :  get unnecessary event: wd=1 mask=800 cookie=0
>>>> len=0name=""
>>>> -bash-3.2#
>>>>
>>>>
>>>> This inotify02 test case failed.
>>>>
>>>> Please give fix for the same.
>>>>
>>> But fix what...
>>>
>>> You are using 2.6.23, and the bug in inotify was fixed in 2.6.25, so the 
>>> above
>>> is exactly the expected result.
>>
>> Actually, what was the bug in 2.6.24 and earlier?  Maybe it is
>> something that needs to be documented in man-pages.
>>
>
> In the manpage:
>
>       If successive output  inotify  events  produced  on  the  inotify  file
>       descriptor  are  identical  (same wd, mask, cookie, and name) then they
>       are coalesced into a single event.
>
> This is not true in older kernels due to the bug.

Bother!  I remember testing this, but only in a simple fashion:
queuing two eevets that were the same, and fiding that they were
coalesced.  So if I understand correctly (and some testing now seems
to indicate that this is true), then a new inotify event was checked
to see if it could be coleasced with the oldest event that was queued,
rather than the most recently queued event.  Right?

> The bug description and fix is 1c17d18e3775485bf1e0ce79575eb637a94494a2
>
> I agree it's better to document it in man-pages.

Yes, I will document this.

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to