On Tue, Mar 10, 2009 at 12:31 PM, Michael Kerrisk <[email protected]> wrote: > 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
I'd actually add that as a comment in the actual code; having a terse message like that can be misleading. I think you'd earn bonus points from several groups if you could disable that message with kernel version > 2.6.25 as well ;). Thanks, -Garrett ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
