On Wed, Mar 11, 2009 at 7:07 AM, Andrew Vagin <[email protected]> wrote: > we have many messages about this bug in mail lists. > Let's add proper comment in code. > > version 2: add more info about bug > --- > testcases/kernel/syscalls/inotify/inotify02.c | 17 ++++++++++++++++- > 1 files changed, 16 insertions(+), 1 deletions(-) > mode change 100644 => 100755 > testcases/kernel/containers/netns/container_ftp.pl > > diff --git a/testcases/kernel/syscalls/inotify/inotify02.c > b/testcases/kernel/syscalls/inotify/inotify02.c > index b8b94d6..30648cb 100644 > --- a/testcases/kernel/syscalls/inotify/inotify02.c > +++ b/testcases/kernel/syscalls/inotify/inotify02.c > @@ -210,7 +210,9 @@ int main(int ac, char **av){ > > /* > * test that duplicate events will be coalesced into > - * a single event > + * a single event. This test case should be last, that > + * we can correct determine kernel bug which exist before > + * 2.6.25. See comment below. > */ > snprintf(fname3, BUF_SIZE, "%s.rename2", fname1); > if (rename(fname2, fname3) == -1){ > @@ -250,6 +252,19 @@ int main(int ac, char **av){ > struct inotify_event *event; > event = (struct inotify_event *) &event_buf[i]; > if (test_num >= TST_TOTAL){ > + if (tst_kvercmp(2,6,25) < 0 && \ > + event_set[TST_TOTAL - 1].mask == event->mask) > + tst_resm(TWARN, "It's may be kernel bug. " > \
"This may be a kernel bug" > + "Before kernel 2.6.25, a kernel bug " > \ > + "meant that the kernel code that was " > \ > + "intended to coalesce successive identical " > \ > + "events (i.e., the two most recent " > \ > + "events could potentially be coalesced " > \ > + "if the older had not yet been read) " > \ > + "instead checked if the most recent event " > \ > + "could be coalesced with the oldest " > \ > + "unread event. it has been fixed by commit" > \ "This has been fixed..." Cheers, Michael > + "1c17d18e3775485bf1e0ce79575eb637a94494a2."); > tst_resm(TFAIL, "get unnecessary event: " > "wd=%d mask=%x cookie=%u len=%u" > "name=\"%s\"",event->wd, event->mask, > -- > 1.6.0.6 > > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git 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 ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
