* Re: [LTP] [PATCH] fix "eventfd01" test
2010-04-08 17:34 ` Garrett Cooper
@ 2010-04-09 0:58 ` Mitani
2010-04-15 3:01 ` Mitani
1 sibling, 0 replies; 6+ messages in thread
From: Mitani @ 2010-04-09 0:58 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list
Hi Garrett,
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Friday, April 09, 2010 2:35 AM
> To: Mitani
> Cc: <ltp-list@lists.sourceforge.net>
> Subject: Re: [LTP] [PATCH] fix "eventfd01" test
>
> On Apr 8, 2010, at 1:47 AM, "Mitani" <mitani@ryobi.co.jp> wrote:
>
> > Hi,
> >
> >
> > I tried "eventfd01" test in my system.
> > This test failed with TWARN (return code:4) :
> >
> > ------------
> > eventfd01 1 TCONF : 2.6.22 or greater kernel required
> > eventfd01 2 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 3 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 4 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 5 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 6 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 7 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 8 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 9 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 10 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 11 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 12 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 13 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 14 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 15 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 0 TWARN : tst_rmdir(): TESTDIR was NULL; no
> removal
> > attempted
> > ------------
> >
> > My system's kernel level is 2.6.18-164.el5
> > Therefore this test rejected:
> >
> > ------< eventfd01.c - main() >------
> > if (tst_kvercmp(2, 6, 22) < 0)
> > tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel
> > required");
> > ------------
> >
> > But, this "tst_brkm()" called "cleanup()".
> > "tst_rmdir()" is called in "cleanup()", and this checked "TESTDIR":
> >
> > ------< tst_tmpdir.c - tst_rmdir() >------
> > /*
> > * Check that TESTDIR is not NULL.
> > */
> > if ( TESTDIR == NULL ) {
> > tst_resm(TWARN, "%s: TESTDIR was NULL; no removal attempted",
> > FN_NAME);
> > return;
> > }
> > ------------
> >
> > This TWARN caused FAIL.
> > "TESTDIR" is NULL because the test didn't start.
> >
> > I think that "cleanup()" doesn't have to be called in this case.
> >
> >
> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
> >
> > ============
> > --- a/testcases/kernel/syscalls/eventfd/eventfd01.c
> 2010-04-01
> > 15:23:10.000000000 +0900
> > +++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
> 2010-04-08
> > 17:16:35.000000000 +0900
> > @@ -728,8 +728,10 @@
> > /* capture signals */
> > tst_sig(FORK, DEF_HANDLER, cleanup);
> >
> > - if (tst_kvercmp(2, 6, 22) < 0)
> > - tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel
> > required");
> > + if (tst_kvercmp(2, 6, 22) < 0) {
> > + tst_brkm(TCONF, NULL, "2.6.22 or greater kernel
> > required");
> > + tst_exit();
> > + }
> >
> > /* Create a temporary directory & chdir there */
> > tst_tmpdir();
> > ============
>
> Try tst_exit instead of NULL.
> Cheers,
> -Garrett
Oh, I didn't notice it!
I revised my patch by advice of Garrett, and confirmed that it
worked as I intended.
I want to suggest patch again.
Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
============
--- a/testcases/kernel/syscalls/eventfd/eventfd01.c 2010-04-01
15:23:10.000000000 +0900
+++ b/testcases/kernel/syscalls/eventfd/eventfd01.c 2010-04-09
09:06:48.000000000 +0900
@@ -729,7 +729,7 @@
tst_sig(FORK, DEF_HANDLER, cleanup);
if (tst_kvercmp(2, 6, 22) < 0)
- tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel
required");
+ tst_brkm(TCONF, tst_exit, "2.6.22 or greater kernel
required");
/* Create a temporary directory & chdir there */
tst_tmpdir();
============
Thank you--
-Tomonori Mitani
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [LTP] [PATCH] fix "eventfd01" test
2010-04-08 17:34 ` Garrett Cooper
2010-04-09 0:58 ` Mitani
@ 2010-04-15 3:01 ` Mitani
2010-04-15 6:52 ` Rishikesh K Rajak
1 sibling, 1 reply; 6+ messages in thread
From: Mitani @ 2010-04-15 3:01 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list, kamimura
[-- Attachment #1: Type: text/plain, Size: 3648 bytes --]
Sorry.
My patch was destroyed by e-mail.
I attach patch for "eventfd01.c" file.
Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
Regards--
-Tomonori Mitani
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Friday, April 09, 2010 2:35 AM
> To: Mitani
> Cc: <ltp-list@lists.sourceforge.net>
> Subject: Re: [LTP] [PATCH] fix "eventfd01" test
>
> On Apr 8, 2010, at 1:47 AM, "Mitani" <mitani@ryobi.co.jp> wrote:
>
> > Hi,
> >
> >
> > I tried "eventfd01" test in my system.
> > This test failed with TWARN (return code:4) :
> >
> > ------------
> > eventfd01 1 TCONF : 2.6.22 or greater kernel required
> > eventfd01 2 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 3 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 4 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 5 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 6 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 7 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 8 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 9 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 10 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 11 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 12 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 13 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 14 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 15 TCONF : Remaining cases not appropriate for
> > configuration
> > eventfd01 0 TWARN : tst_rmdir(): TESTDIR was NULL; no
> removal
> > attempted
> > ------------
> >
> > My system's kernel level is 2.6.18-164.el5
> > Therefore this test rejected:
> >
> > ------< eventfd01.c - main() >------
> > if (tst_kvercmp(2, 6, 22) < 0)
> > tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel
> > required");
> > ------------
> >
> > But, this "tst_brkm()" called "cleanup()".
> > "tst_rmdir()" is called in "cleanup()", and this checked "TESTDIR":
> >
> > ------< tst_tmpdir.c - tst_rmdir() >------
> > /*
> > * Check that TESTDIR is not NULL.
> > */
> > if ( TESTDIR == NULL ) {
> > tst_resm(TWARN, "%s: TESTDIR was NULL; no removal attempted",
> > FN_NAME);
> > return;
> > }
> > ------------
> >
> > This TWARN caused FAIL.
> > "TESTDIR" is NULL because the test didn't start.
> >
> > I think that "cleanup()" doesn't have to be called in this case.
> >
> >
> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
> >
> > ============
> > --- a/testcases/kernel/syscalls/eventfd/eventfd01.c
> 2010-04-01
> > 15:23:10.000000000 +0900
> > +++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
> 2010-04-08
> > 17:16:35.000000000 +0900
> > @@ -728,8 +728,10 @@
> > /* capture signals */
> > tst_sig(FORK, DEF_HANDLER, cleanup);
> >
> > - if (tst_kvercmp(2, 6, 22) < 0)
> > - tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel
> > required");
> > + if (tst_kvercmp(2, 6, 22) < 0) {
> > + tst_brkm(TCONF, NULL, "2.6.22 or greater kernel
> > required");
> > + tst_exit();
> > + }
> >
> > /* Create a temporary directory & chdir there */
> > tst_tmpdir();
> > ============
>
> Try tst_exit instead of NULL.
> Cheers,
> -Garrett
[-- Attachment #2: eventfd01.patch --]
[-- Type: application/octet-stream, Size: 483 bytes --]
--- a/testcases/kernel/syscalls/eventfd/eventfd01.c 2010-04-01 15:23:10.000000000 +0900
+++ b/testcases/kernel/syscalls/eventfd/eventfd01.c 2010-04-09 09:06:48.000000000 +0900
@@ -729,7 +729,7 @@
tst_sig(FORK, DEF_HANDLER, cleanup);
if (tst_kvercmp(2, 6, 22) < 0)
- tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel required");
+ tst_brkm(TCONF, tst_exit, "2.6.22 or greater kernel required");
/* Create a temporary directory & chdir there */
tst_tmpdir();
[-- Attachment #3: Type: text/plain, Size: 345 bytes --]
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [LTP] [PATCH] fix "eventfd01" test
2010-04-15 3:01 ` Mitani
@ 2010-04-15 6:52 ` Rishikesh K Rajak
2010-04-15 8:37 ` Garrett Cooper
0 siblings, 1 reply; 6+ messages in thread
From: Rishikesh K Rajak @ 2010-04-15 6:52 UTC (permalink / raw)
To: Mitani; +Cc: ltp-list, kamimura
On Thu, Apr 15, 2010 at 12:01:40PM +0900, Mitani wrote:
>
> Sorry.
> My patch was destroyed by e-mail.
> I attach patch for "eventfd01.c" file.
Applied to next branch. Will wait for someone to Acked/test it before merging to
master.
Thanks
-Rishi
>
>
> Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
>
>
> Regards--
>
> -Tomonori Mitani
>
> > -----Original Message-----
> > From: Garrett Cooper [mailto:yanegomi@gmail.com]
> > Sent: Friday, April 09, 2010 2:35 AM
> > To: Mitani
> > Cc: <ltp-list@lists.sourceforge.net>
> > Subject: Re: [LTP] [PATCH] fix "eventfd01" test
> >
> > On Apr 8, 2010, at 1:47 AM, "Mitani" <mitani@ryobi.co.jp> wrote:
> >
> > > Hi,
> > >
> > >
> > > I tried "eventfd01" test in my system.
> > > This test failed with TWARN (return code:4) :
> > >
> > > ------------
> > > eventfd01 1 TCONF : 2.6.22 or greater kernel required
> > > eventfd01 2 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 3 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 4 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 5 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 6 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 7 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 8 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 9 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 10 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 11 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 12 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 13 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 14 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 15 TCONF : Remaining cases not appropriate for
> > > configuration
> > > eventfd01 0 TWARN : tst_rmdir(): TESTDIR was NULL; no
> > removal
> > > attempted
> > > ------------
> > >
> > > My system's kernel level is 2.6.18-164.el5
> > > Therefore this test rejected:
> > >
> > > ------< eventfd01.c - main() >------
> > > if (tst_kvercmp(2, 6, 22) < 0)
> > > tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel
> > > required");
> > > ------------
> > >
> > > But, this "tst_brkm()" called "cleanup()".
> > > "tst_rmdir()" is called in "cleanup()", and this checked "TESTDIR":
> > >
> > > ------< tst_tmpdir.c - tst_rmdir() >------
> > > /*
> > > * Check that TESTDIR is not NULL.
> > > */
> > > if ( TESTDIR == NULL ) {
> > > tst_resm(TWARN, "%s: TESTDIR was NULL; no removal attempted",
> > > FN_NAME);
> > > return;
> > > }
> > > ------------
> > >
> > > This TWARN caused FAIL.
> > > "TESTDIR" is NULL because the test didn't start.
> > >
> > > I think that "cleanup()" doesn't have to be called in this case.
> > >
> > >
> > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
> > >
> > > ============
> > > --- a/testcases/kernel/syscalls/eventfd/eventfd01.c
> > 2010-04-01
> > > 15:23:10.000000000 +0900
> > > +++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
> > 2010-04-08
> > > 17:16:35.000000000 +0900
> > > @@ -728,8 +728,10 @@
> > > /* capture signals */
> > > tst_sig(FORK, DEF_HANDLER, cleanup);
> > >
> > > - if (tst_kvercmp(2, 6, 22) < 0)
> > > - tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel
> > > required");
> > > + if (tst_kvercmp(2, 6, 22) < 0) {
> > > + tst_brkm(TCONF, NULL, "2.6.22 or greater kernel
> > > required");
> > > + tst_exit();
> > > + }
> > >
> > > /* Create a temporary directory & chdir there */
> > > tst_tmpdir();
> > > ============
> >
> > Try tst_exit instead of NULL.
> > Cheers,
> > -Garrett
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
--
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [LTP] [PATCH] fix "eventfd01" test
2010-04-15 6:52 ` Rishikesh K Rajak
@ 2010-04-15 8:37 ` Garrett Cooper
0 siblings, 0 replies; 6+ messages in thread
From: Garrett Cooper @ 2010-04-15 8:37 UTC (permalink / raw)
To: Mitani, Garrett Cooper, ltp-list, kamimura
On Wed, Apr 14, 2010 at 11:52 PM, Rishikesh K Rajak
<risrajak@linux.vnet.ibm.com> wrote:
> On Thu, Apr 15, 2010 at 12:01:40PM +0900, Mitani wrote:
>>
>> Sorry.
>> My patch was destroyed by e-mail.
>> I attach patch for "eventfd01.c" file.
>
> Applied to next branch. Will wait for someone to Acked/test it before merging to
> master.
>
> Thanks
> -Rishi
>
>>
>>
>> Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
>>
>>
>> Regards--
>>
>> -Tomonori Mitani
>>
>> > -----Original Message-----
>> > From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> > Sent: Friday, April 09, 2010 2:35 AM
>> > To: Mitani
>> > Cc: <ltp-list@lists.sourceforge.net>
>> > Subject: Re: [LTP] [PATCH] fix "eventfd01" test
>> >
>> > On Apr 8, 2010, at 1:47 AM, "Mitani" <mitani@ryobi.co.jp> wrote:
>> >
>> > > Hi,
>> > >
>> > >
>> > > I tried "eventfd01" test in my system.
>> > > This test failed with TWARN (return code:4) :
>> > >
>> > > ------------
>> > > eventfd01 1 TCONF : 2.6.22 or greater kernel required
>> > > eventfd01 2 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 3 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 4 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 5 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 6 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 7 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 8 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 9 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 10 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 11 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 12 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 13 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 14 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 15 TCONF : Remaining cases not appropriate for
>> > > configuration
>> > > eventfd01 0 TWARN : tst_rmdir(): TESTDIR was NULL; no
>> > removal
>> > > attempted
>> > > ------------
>> > >
>> > > My system's kernel level is 2.6.18-164.el5
>> > > Therefore this test rejected:
>> > >
>> > > ------< eventfd01.c - main() >------
>> > > if (tst_kvercmp(2, 6, 22) < 0)
>> > > tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel
>> > > required");
>> > > ------------
>> > >
>> > > But, this "tst_brkm()" called "cleanup()".
>> > > "tst_rmdir()" is called in "cleanup()", and this checked "TESTDIR":
>> > >
>> > > ------< tst_tmpdir.c - tst_rmdir() >------
>> > > /*
>> > > * Check that TESTDIR is not NULL.
>> > > */
>> > > if ( TESTDIR == NULL ) {
>> > > tst_resm(TWARN, "%s: TESTDIR was NULL; no removal attempted",
>> > > FN_NAME);
>> > > return;
>> > > }
>> > > ------------
>> > >
>> > > This TWARN caused FAIL.
>> > > "TESTDIR" is NULL because the test didn't start.
>> > >
>> > > I think that "cleanup()" doesn't have to be called in this case.
>> > >
>> > >
>> > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
>> > >
>> > > ============
>> > > --- a/testcases/kernel/syscalls/eventfd/eventfd01.c
>> > 2010-04-01
>> > > 15:23:10.000000000 +0900
>> > > +++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
>> > 2010-04-08
>> > > 17:16:35.000000000 +0900
>> > > @@ -728,8 +728,10 @@
>> > > /* capture signals */
>> > > tst_sig(FORK, DEF_HANDLER, cleanup);
>> > >
>> > > - if (tst_kvercmp(2, 6, 22) < 0)
>> > > - tst_brkm(TCONF, cleanup, "2.6.22 or greater kernel
>> > > required");
>> > > + if (tst_kvercmp(2, 6, 22) < 0) {
>> > > + tst_brkm(TCONF, NULL, "2.6.22 or greater kernel
>> > > required");
>> > > + tst_exit();
>> > > + }
>> > >
>> > > /* Create a temporary directory & chdir there */
>> > > tst_tmpdir();
>> > > ============
>> >
>> > Try tst_exit instead of NULL.
>> > Cheers,
>> > -Garrett
Acked-by: Garrett Cooper <yanegomi@gmail.com>
-Garrett
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread