* [LTP] [PATCH] fix "hugetlb" several tests
@ 2010-04-13 6:58 Mitani
2010-04-13 15:03 ` Randy Dunlap
0 siblings, 1 reply; 17+ messages in thread
From: Mitani @ 2010-04-13 6:58 UTC (permalink / raw)
To: ltp-list
Hi,
I tried "hugemmap", "hugeshmat", "hugeshmctl", "hugeshmdt" and
"hugeshmget" tests.
And I found several fails in them:
------------<at "${LTPROOT}/testcases/kernel/mem/hugetlb/" directory>
- ./hugemmap/
1) hugemmap04 : return code = 2
- ./hugeshmat/
2) hugeshmat01 : return code = 6
3) hugeshmat02 : return code = 6
4) hugeshmat03 : return code = 2
- ./hugeshmctl/
5) hugeshmctl01 : return code = 6
6) hugeshmctl02 : return code = 6
7) hugeshmctl03 : return code = 2
- ./hugeshmdt/
8) hugeshmdt01 : return code = 6
- ./hugeshmget/
9) hugeshmget01 : return code = 2
10) hugeshmget02 : return code = 6
11) hugeshmget03 : return code = 6
12) hugeshmget05 : return code = 2
------------
These tests output following messages:
------------
a) All tests:
"TBROK : Test cannot be continued owning to sufficient availability of
Hugepages on the system"
b) 2), 3), 5), 6), 8), 10), 11) tests:
"TWARN : tst_rmdir(): TESTDIR was NULL; no removal attempted"
------------
Both case a) and case b) are caused by the same reason.
All of case a) failures occured at the following points (for example
hugemmap04):
------------<hugemmap04.c - main()>
/* Check number of hugepages */
if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
\
sufficient availability of Hugepages on the
system");
------------
I found out that "HugePages_Total" parameter of "/proc/meminfo" file
is set to "0". This caused above TBROK failure. It is environment problem.
But, in this case, tests must not return with TBROK, but with TCONF,
I think.
And, in case b), these tests try to delete "TESTDIR" directory by
calling "tst_rmdir()" function in "cleanup()" function.
But, "TESTDIR" never set if "tst_tmpdir()" function isn't called.
I think that case b)'s tests must not call cleanup() function.
I want to suggest following patch.
Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
============
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-13
11:23:33.000000000 +0900
@@ -127,7 +127,7 @@
/* Check number of hugepages */
if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
\
+ tst_brkm(TCONF, cleanup, "Test cannot be continued owning to
\
sufficient availability of Hugepages on the
system");
/* Perform global setup for test */
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-13
11:36:25.000000000 +0900
@@ -105,7 +105,7 @@
}
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, tst_exit, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-13
11:37:41.000000000 +0900
@@ -102,7 +102,7 @@
}
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, tst_exit, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-13
11:38:16.000000000 +0900
@@ -86,7 +86,7 @@
}
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
--- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-13
11:41:23.000000000 +0900
@@ -130,7 +130,7 @@
}
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, tst_exit, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
--- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-13
11:41:48.000000000 +0900
@@ -102,7 +102,7 @@
}
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, tst_exit, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
--- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-13
11:42:10.000000000 +0900
@@ -105,7 +105,7 @@
}
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
--- a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-13
11:42:55.000000000 +0900
@@ -87,7 +87,7 @@
}
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, tst_exit, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-13
11:43:30.000000000 +0900
@@ -82,7 +82,7 @@
/* The following loop checks looping state if -i option given */
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-13
11:43:51.000000000 +0900
@@ -84,7 +84,7 @@
}
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, tst_exit, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-13
11:44:10.000000000 +0900
@@ -85,7 +85,7 @@
/* The following loop checks looping state if -i option given */
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, tst_exit, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-01
15:23:09.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-13
11:44:29.000000000 +0900
@@ -86,7 +86,7 @@
}
if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
- tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
+ tst_brkm(TCONF, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;
============
Regards--
-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] 17+ messages in thread* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-13 6:58 [LTP] [PATCH] fix "hugetlb" several tests Mitani @ 2010-04-13 15:03 ` Randy Dunlap 2010-04-14 2:17 ` Mitani 0 siblings, 1 reply; 17+ messages in thread From: Randy Dunlap @ 2010-04-13 15:03 UTC (permalink / raw) To: Mitani; +Cc: ltp-list On 04/12/10 23:58, Mitani wrote: > ------------ > a) All tests: > "TBROK : Test cannot be continued owning to sufficient availability of > Hugepages on the system" > > b) 2), 3), 5), 6), 8), 10), 11) tests: > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal attempted" > ------------ > > Both case a) and case b) are caused by the same reason. > > All of case a) failures occured at the following points (for example > hugemmap04): > ------------<hugemmap04.c - main()> > /* Check number of hugepages */ > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) > tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > \ > sufficient availability of Hugepages on the > system"); > ------------ > > I found out that "HugePages_Total" parameter of "/proc/meminfo" file > is set to "0". This caused above TBROK failure. It is environment problem. > > But, in this case, tests must not return with TBROK, but with TCONF, > I think. That makes sense to me. > And, in case b), these tests try to delete "TESTDIR" directory by > calling "tst_rmdir()" function in "cleanup()" function. > But, "TESTDIR" never set if "tst_tmpdir()" function isn't called. > I think that case b)'s tests must not call cleanup() function. > > > I want to suggest following patch. > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > > ============ > --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-13 > 11:23:33.000000000 +0900 > @@ -127,7 +127,7 @@ > > /* Check number of hugepages */ > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > \ > + tst_brkm(TCONF, cleanup, "Test cannot be continued owning to > \ > sufficient availability of Hugepages on the > system"); > > /* Perform global setup for test */ Not caused by your patch, but all of those "owning to" should be "owing to" or even better, "due to". -- ~Randy ------------------------------------------------------------------------------ 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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-13 15:03 ` Randy Dunlap @ 2010-04-14 2:17 ` Mitani 2010-04-14 6:17 ` Garrett Cooper 0 siblings, 1 reply; 17+ messages in thread From: Mitani @ 2010-04-14 2:17 UTC (permalink / raw) To: 'Randy Dunlap'; +Cc: ltp-list Hi Randy, I couldn't notice a misspelling. Sorry. I decided to use "due to" according to your advice. May I suggest revised patch? Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> ============ --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-13 11:23:33.000000000 +0900 @@ -127,7 +127,7 @@ /* Check number of hugepages */ if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to \ + tst_brkm(TCONF, cleanup, "Test cannot be continued due to \ sufficient availability of Hugepages on the system"); /* Perform global setup for test */ --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-13 11:36:25.000000000 +0900 @@ -105,7 +105,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-13 11:37:41.000000000 +0900 @@ -102,7 +102,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-13 11:38:16.000000000 +0900 @@ -86,7 +86,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-13 11:41:23.000000000 +0900 @@ -130,7 +130,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-13 11:41:48.000000000 +0900 @@ -102,7 +102,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-13 11:42:10.000000000 +0900 @@ -105,7 +105,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-13 11:42:55.000000000 +0900 @@ -87,7 +87,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-13 11:43:30.000000000 +0900 @@ -82,7 +82,7 @@ /* The following loop checks looping state if -i option given */ if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-13 11:43:51.000000000 +0900 @@ -84,7 +84,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-13 11:44:10.000000000 +0900 @@ -85,7 +85,7 @@ /* The following loop checks looping state if -i option given */ if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-13 11:44:29.000000000 +0900 @@ -86,7 +86,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Test cannot be continued due to sufficient availability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; ============ Thank you-- -Tomonori Mitani > -----Original Message----- > From: Randy Dunlap [mailto:rdunlap@xenotime.net] > Sent: Wednesday, April 14, 2010 12:04 AM > To: Mitani > Cc: ltp-list@lists.sourceforge.net > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > > On 04/12/10 23:58, Mitani wrote: > > ------------ > > a) All tests: > > "TBROK : Test cannot be continued owning to sufficient > availability of > > Hugepages on the system" > > > > b) 2), 3), 5), 6), 8), 10), 11) tests: > > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal attempted" > > ------------ > > > > Both case a) and case b) are caused by the same reason. > > > > All of case a) failures occured at the following points (for example > > hugemmap04): > > ------------<hugemmap04.c - main()> > > /* Check number of hugepages */ > > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) > > tst_brkm(TBROK, cleanup, "Test cannot be continued > owning to > > \ > > sufficient availability of > Hugepages on the > > system"); > > ------------ > > > > I found out that "HugePages_Total" parameter of "/proc/meminfo" file > > is set to "0". This caused above TBROK failure. It is environment > problem. > > > > But, in this case, tests must not return with TBROK, but with TCONF, > > I think. > > That makes sense to me. > > > And, in case b), these tests try to delete "TESTDIR" directory by > > calling "tst_rmdir()" function in "cleanup()" function. > > But, "TESTDIR" never set if "tst_tmpdir()" function isn't called. > > I think that case b)'s tests must not call cleanup() function. > > > > > > I want to suggest following patch. > > > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > > > > ============ > > --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c > 2010-04-01 > > 15:23:09.000000000 +0900 > > +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c > 2010-04-13 > > 11:23:33.000000000 +0900 > > @@ -127,7 +127,7 @@ > > > > /* Check number of hugepages */ > > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) > > - tst_brkm(TBROK, cleanup, "Test cannot be continued > owning to > > \ > > + tst_brkm(TCONF, cleanup, "Test cannot be continued > owning to > > \ > > sufficient availability of Hugepages > on the > > system"); > > > > /* Perform global setup for test */ > > Not caused by your patch, but all of those "owning to" should be "owing > to" > or even better, "due to". > > -- > ~Randy ------------------------------------------------------------------------------ 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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-14 2:17 ` Mitani @ 2010-04-14 6:17 ` Garrett Cooper 2010-04-14 8:58 ` Mitani 0 siblings, 1 reply; 17+ messages in thread From: Garrett Cooper @ 2010-04-14 6:17 UTC (permalink / raw) To: Mitani; +Cc: ltp-list, Randy Dunlap On Tue, Apr 13, 2010 at 7:17 PM, Mitani <mitani@ryobi.co.jp> wrote: > Hi Randy, > > I couldn't notice a misspelling. Sorry. > I decided to use "due to" according to your advice. > > May I suggest revised patch? > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > > ============ > --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-13 > 11:23:33.000000000 +0900 > @@ -127,7 +127,7 @@ > > /* Check number of hugepages */ > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > \ > + tst_brkm(TCONF, cleanup, "Test cannot be continued due to \ > sufficient availability of Hugepages on the > system"); > > /* Perform global setup for test */ > --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-13 > 11:36:25.000000000 +0900 > @@ -105,7 +105,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-13 > 11:37:41.000000000 +0900 > @@ -102,7 +102,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-13 > 11:38:16.000000000 +0900 > @@ -86,7 +86,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-13 > 11:41:23.000000000 +0900 > @@ -130,7 +130,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-13 > 11:41:48.000000000 +0900 > @@ -102,7 +102,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-13 > 11:42:10.000000000 +0900 > @@ -105,7 +105,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-13 > 11:42:55.000000000 +0900 > @@ -87,7 +87,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-13 > 11:43:30.000000000 +0900 > @@ -82,7 +82,7 @@ > > /* The following loop checks looping state if -i option given */ > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-13 > 11:43:51.000000000 +0900 > @@ -84,7 +84,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-13 > 11:44:10.000000000 +0900 > @@ -85,7 +85,7 @@ > > /* The following loop checks looping state if -i option given */ > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-13 > 11:44:29.000000000 +0900 > @@ -86,7 +86,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Test cannot be continued due to > sufficient availability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > ============ > > > Thank you-- > > -Tomonori Mitani > > >> -----Original Message----- >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] >> Sent: Wednesday, April 14, 2010 12:04 AM >> To: Mitani >> Cc: ltp-list@lists.sourceforge.net >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> >> On 04/12/10 23:58, Mitani wrote: >> > ------------ >> > a) All tests: >> > "TBROK : Test cannot be continued owning to sufficient >> availability of >> > Hugepages on the system" >> > >> > b) 2), 3), 5), 6), 8), 10), 11) tests: >> > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal attempted" >> > ------------ >> > >> > Both case a) and case b) are caused by the same reason. >> > >> > All of case a) failures occured at the following points (for example >> > hugemmap04): >> > ------------<hugemmap04.c - main()> >> > /* Check number of hugepages */ >> > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) >> > tst_brkm(TBROK, cleanup, "Test cannot be continued >> owning to >> > \ >> > sufficient availability of >> Hugepages on the >> > system"); >> > ------------ >> > >> > I found out that "HugePages_Total" parameter of "/proc/meminfo" file >> > is set to "0". This caused above TBROK failure. It is environment >> problem. >> > >> > But, in this case, tests must not return with TBROK, but with TCONF, >> > I think. >> >> That makes sense to me. >> >> > And, in case b), these tests try to delete "TESTDIR" directory by >> > calling "tst_rmdir()" function in "cleanup()" function. >> > But, "TESTDIR" never set if "tst_tmpdir()" function isn't called. >> > I think that case b)'s tests must not call cleanup() function. >> > >> > >> > I want to suggest following patch. >> > >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> >> > >> > ============ >> > --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c >> 2010-04-01 >> > 15:23:09.000000000 +0900 >> > +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c >> 2010-04-13 >> > 11:23:33.000000000 +0900 >> > @@ -127,7 +127,7 @@ >> > >> > /* Check number of hugepages */ >> > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) >> > - tst_brkm(TBROK, cleanup, "Test cannot be continued >> owning to >> > \ >> > + tst_brkm(TCONF, cleanup, "Test cannot be continued >> owning to >> > \ >> > sufficient availability of Hugepages >> on the >> > system"); >> > >> > /* Perform global setup for test */ >> >> Not caused by your patch, but all of those "owning to" should be "owing >> to" >> or even better, "due to". Sorry... it might have been better to say (more succinctly): "Not enough available Hugepages" ? Thanks, -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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-14 6:17 ` Garrett Cooper @ 2010-04-14 8:58 ` Mitani 2010-04-14 9:18 ` Ryan Wang ` (2 more replies) 0 siblings, 3 replies; 17+ messages in thread From: Mitani @ 2010-04-14 8:58 UTC (permalink / raw) To: 'Garrett Cooper'; +Cc: ltp-list > -----Original Message----- > From: Garrett Cooper [mailto:yanegomi@gmail.com] > Sent: Wednesday, April 14, 2010 3:18 PM > To: Mitani > Cc: Randy Dunlap; ltp-list@lists.sourceforge.net > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > > On Tue, Apr 13, 2010 at 7:17 PM, Mitani <mitani@ryobi.co.jp> wrote: > > Hi Randy, > > > > I couldn't notice a misspelling. Sorry. > > I decided to use "due to" according to your advice. > > > > May I suggest revised patch? > > [...] > > > > Thank you-- > > > > -Tomonori Mitani > > > > > >> -----Original Message----- > >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] > >> Sent: Wednesday, April 14, 2010 12:04 AM > >> To: Mitani > >> Cc: ltp-list@lists.sourceforge.net > >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > >> > >> On 04/12/10 23:58, Mitani wrote: > >> > ------------ > >> > a) All tests: > >> > "TBROK : Test cannot be continued owning to sufficient > >> availability of > >> > Hugepages on the system" > >> > > >> > b) 2), 3), 5), 6), 8), 10), 11) tests: > >> > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal attempted" > >> > ------------ > >> > > >> > Both case a) and case b) are caused by the same reason. > >> > > >> > All of case a) failures occured at the following points (for > example > >> > hugemmap04): > >> > ------------<hugemmap04.c - main()> > >> > /* Check number of hugepages */ > >> > if (get_no_of_hugepages() <= 0 || hugepages_size() <= > 0) > >> > tst_brkm(TBROK, cleanup, "Test cannot be > continued > >> owning to > >> > \ > >> > sufficient availability of > >> Hugepages on the > >> > system"); > >> > ------------ > >> > > >> > I found out that "HugePages_Total" parameter of "/proc/meminfo" > file > >> > is set to "0". This caused above TBROK failure. It is environment > >> problem. > >> > > >> > But, in this case, tests must not return with TBROK, but with TCONF, > >> > I think. > >> > >> That makes sense to me. > >> > >> > And, in case b), these tests try to delete "TESTDIR" directory > by > >> > calling "tst_rmdir()" function in "cleanup()" function. > >> > But, "TESTDIR" never set if "tst_tmpdir()" function isn't called. > >> > I think that case b)'s tests must not call cleanup() function. > >> > > >> > > >> > I want to suggest following patch. > >> > > >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > >> > > >> > ============ > >> > --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c > >> 2010-04-01 > >> > 15:23:09.000000000 +0900 > >> > +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c > >> 2010-04-13 > >> > 11:23:33.000000000 +0900 > >> > @@ -127,7 +127,7 @@ > >> > > >> > /* Check number of hugepages */ > >> > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) > >> > - tst_brkm(TBROK, cleanup, "Test cannot be continued > >> owning to > >> > \ > >> > + tst_brkm(TCONF, cleanup, "Test cannot be continued > >> owning to > >> > \ > >> > sufficient availability of > Hugepages > >> on the > >> > system"); > >> > > >> > /* Perform global setup for test */ > >> > >> Not caused by your patch, but all of those "owning to" should be > "owing > >> to" > >> or even better, "due to". > > Sorry... it might have been better to say (more succinctly): "Not > enough available Hugepages" ? > Thanks, > -Garrett Hi, I suggest new patch. Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> ============ --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-14 16:40:25.000000000 +0900 @@ -127,8 +127,7 @@ /* Check number of hugepages */ if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to \ - sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); /* Perform global setup for test */ setup(); --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-14 16:48:54.000000000 +0900 @@ -105,7 +105,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-14 16:49:15.000000000 +0900 @@ -102,7 +102,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-14 16:49:31.000000000 +0900 @@ -86,7 +86,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-14 16:50:16.000000000 +0900 @@ -130,7 +130,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-14 16:50:28.000000000 +0900 @@ -102,7 +102,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-14 16:50:40.000000000 +0900 @@ -105,7 +105,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-14 16:51:11.000000000 +0900 @@ -87,7 +87,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-14 16:51:34.000000000 +0900 @@ -82,7 +82,7 @@ /* The following loop checks looping state if -i option given */ if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-14 16:51:45.000000000 +0900 @@ -84,7 +84,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-14 16:51:55.000000000 +0900 @@ -85,7 +85,7 @@ /* The following loop checks looping state if -i option given */ if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-14 16:52:10.000000000 +0900 @@ -86,7 +86,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; ============ Regards-- -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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-14 8:58 ` Mitani @ 2010-04-14 9:18 ` Ryan Wang 2010-04-14 9:30 ` Garrett Cooper 2010-04-14 15:19 ` Randy Dunlap 2 siblings, 0 replies; 17+ messages in thread From: Ryan Wang @ 2010-04-14 9:18 UTC (permalink / raw) To: Mitani; +Cc: ltp-list 2010/4/14 Mitani <mitani@ryobi.co.jp>: >> -----Original Message----- >> From: Garrett Cooper [mailto:yanegomi@gmail.com] >> Sent: Wednesday, April 14, 2010 3:18 PM >> To: Mitani >> Cc: Randy Dunlap; ltp-list@lists.sourceforge.net >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> >> On Tue, Apr 13, 2010 at 7:17 PM, Mitani <mitani@ryobi.co.jp> wrote: >> > Hi Randy, >> > >> > I couldn't notice a misspelling. Sorry. >> > I decided to use "due to" according to your advice. >> > >> > May I suggest revised patch? >> > > [...] >> > >> > Thank you-- >> > >> > -Tomonori Mitani >> > >> > >> >> -----Original Message----- >> >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] >> >> Sent: Wednesday, April 14, 2010 12:04 AM >> >> To: Mitani >> >> Cc: ltp-list@lists.sourceforge.net >> >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> >> >> >> On 04/12/10 23:58, Mitani wrote: >> >> > ------------ >> >> > a) All tests: >> >> > "TBROK : Test cannot be continued owning to sufficient >> >> availability of >> >> > Hugepages on the system" >> >> > >> >> > b) 2), 3), 5), 6), 8), 10), 11) tests: >> >> > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal attempted" >> >> > ------------ >> >> > >> >> > Both case a) and case b) are caused by the same reason. >> >> > >> >> > All of case a) failures occured at the following points (for >> example >> >> > hugemmap04): >> >> > ------------<hugemmap04.c - main()> >> >> > /* Check number of hugepages */ >> >> > if (get_no_of_hugepages() <= 0 || hugepages_size() <= >> 0) >> >> > tst_brkm(TBROK, cleanup, "Test cannot be >> continued >> >> owning to >> >> > \ >> >> > sufficient availability of >> >> Hugepages on the >> >> > system"); >> >> > ------------ >> >> > >> >> > I found out that "HugePages_Total" parameter of "/proc/meminfo" >> file >> >> > is set to "0". This caused above TBROK failure. It is environment >> >> problem. >> >> > >> >> > But, in this case, tests must not return with TBROK, but with TCONF, >> >> > I think. >> >> >> >> That makes sense to me. >> >> >> >> > And, in case b), these tests try to delete "TESTDIR" directory >> by >> >> > calling "tst_rmdir()" function in "cleanup()" function. >> >> > But, "TESTDIR" never set if "tst_tmpdir()" function isn't called. >> >> > I think that case b)'s tests must not call cleanup() function. >> >> > >> >> > >> >> > I want to suggest following patch. >> >> > >> >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> >> >> > >> >> > ============ >> >> > --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c >> >> 2010-04-01 >> >> > 15:23:09.000000000 +0900 >> >> > +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c >> >> 2010-04-13 >> >> > 11:23:33.000000000 +0900 >> >> > @@ -127,7 +127,7 @@ >> >> > >> >> > /* Check number of hugepages */ >> >> > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) >> >> > - tst_brkm(TBROK, cleanup, "Test cannot be continued >> >> owning to >> >> > \ >> >> > + tst_brkm(TCONF, cleanup, "Test cannot be continued >> >> owning to >> >> > \ >> >> > sufficient availability of >> Hugepages >> >> on the >> >> > system"); >> >> > >> >> > /* Perform global setup for test */ >> >> >> >> Not caused by your patch, but all of those "owning to" should be >> "owing >> >> to" >> >> or even better, "due to". >> >> Sorry... it might have been better to say (more succinctly): "Not >> enough available Hugepages" ? >> Thanks, >> -Garrett > > > Hi, > > I suggest new patch. > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > > ============ > --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-14 > 16:40:25.000000000 +0900 > @@ -127,8 +127,7 @@ > > /* Check number of hugepages */ > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > \ > - sufficient availability of Hugepages on the > system"); > + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); > > /* Perform global setup for test */ > setup(); > --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-14 > 16:48:54.000000000 +0900 > @@ -105,7 +105,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-14 > 16:49:15.000000000 +0900 > @@ -102,7 +102,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-14 > 16:49:31.000000000 +0900 > @@ -86,7 +86,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-14 > 16:50:16.000000000 +0900 > @@ -130,7 +130,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-14 > 16:50:28.000000000 +0900 > @@ -102,7 +102,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-14 > 16:50:40.000000000 +0900 > @@ -105,7 +105,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-14 > 16:51:11.000000000 +0900 > @@ -87,7 +87,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-14 > 16:51:34.000000000 +0900 > @@ -82,7 +82,7 @@ > > /* The following loop checks looping state if -i option given */ > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-14 > 16:51:45.000000000 +0900 > @@ -84,7 +84,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-14 > 16:51:55.000000000 +0900 > @@ -85,7 +85,7 @@ > > /* The following loop checks looping state if -i option given */ > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-14 > 16:52:10.000000000 +0900 > @@ -86,7 +86,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > ============ > > > Regards-- > > -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 > Hi, Does these patches have been merged to the mainline? thanks, ------------------------------------------------------------------------------ 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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-14 8:58 ` Mitani 2010-04-14 9:18 ` Ryan Wang @ 2010-04-14 9:30 ` Garrett Cooper 2010-04-15 0:56 ` Mitani 2010-04-14 15:19 ` Randy Dunlap 2 siblings, 1 reply; 17+ messages in thread From: Garrett Cooper @ 2010-04-14 9:30 UTC (permalink / raw) To: Mitani; +Cc: ltp-list On Wed, Apr 14, 2010 at 1:58 AM, Mitani <mitani@ryobi.co.jp> wrote: >> -----Original Message----- >> From: Garrett Cooper [mailto:yanegomi@gmail.com] >> Sent: Wednesday, April 14, 2010 3:18 PM >> To: Mitani >> Cc: Randy Dunlap; ltp-list@lists.sourceforge.net >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> >> On Tue, Apr 13, 2010 at 7:17 PM, Mitani <mitani@ryobi.co.jp> wrote: >> > Hi Randy, >> > >> > I couldn't notice a misspelling. Sorry. >> > I decided to use "due to" according to your advice. >> > >> > May I suggest revised patch? >> > > [...] >> > >> > Thank you-- >> > >> > -Tomonori Mitani >> > >> > >> >> -----Original Message----- >> >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] >> >> Sent: Wednesday, April 14, 2010 12:04 AM >> >> To: Mitani >> >> Cc: ltp-list@lists.sourceforge.net >> >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> >> >> >> On 04/12/10 23:58, Mitani wrote: >> >> > ------------ >> >> > a) All tests: >> >> > "TBROK : Test cannot be continued owning to sufficient >> >> availability of >> >> > Hugepages on the system" >> >> > >> >> > b) 2), 3), 5), 6), 8), 10), 11) tests: >> >> > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal attempted" >> >> > ------------ >> >> > >> >> > Both case a) and case b) are caused by the same reason. >> >> > >> >> > All of case a) failures occured at the following points (for >> example >> >> > hugemmap04): >> >> > ------------<hugemmap04.c - main()> >> >> > /* Check number of hugepages */ >> >> > if (get_no_of_hugepages() <= 0 || hugepages_size() <= >> 0) >> >> > tst_brkm(TBROK, cleanup, "Test cannot be >> continued >> >> owning to >> >> > \ >> >> > sufficient availability of >> >> Hugepages on the >> >> > system"); >> >> > ------------ >> >> > >> >> > I found out that "HugePages_Total" parameter of "/proc/meminfo" >> file >> >> > is set to "0". This caused above TBROK failure. It is environment >> >> problem. >> >> > >> >> > But, in this case, tests must not return with TBROK, but with TCONF, >> >> > I think. >> >> >> >> That makes sense to me. >> >> >> >> > And, in case b), these tests try to delete "TESTDIR" directory >> by >> >> > calling "tst_rmdir()" function in "cleanup()" function. >> >> > But, "TESTDIR" never set if "tst_tmpdir()" function isn't called. >> >> > I think that case b)'s tests must not call cleanup() function. >> >> > >> >> > >> >> > I want to suggest following patch. >> >> > >> >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> Sorry to ask again, but Gmail always mangles patches. Could you please attach it as a file? Thanks, -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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-14 9:30 ` Garrett Cooper @ 2010-04-15 0:56 ` Mitani 2010-04-15 6:54 ` Rishikesh K Rajak 0 siblings, 1 reply; 17+ messages in thread From: Mitani @ 2010-04-15 0:56 UTC (permalink / raw) To: 'Garrett Cooper'; +Cc: ltp-list, kamimura [-- Attachment #1: Type: text/plain, Size: 3411 bytes --] > -----Original Message----- > From: Garrett Cooper [mailto:yanegomi@gmail.com] > Sent: Wednesday, April 14, 2010 6:31 PM > To: Mitani > Cc: ltp-list@lists.sourceforge.net > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > > On Wed, Apr 14, 2010 at 1:58 AM, Mitani <mitani@ryobi.co.jp> wrote: > >> -----Original Message----- > >> From: Garrett Cooper [mailto:yanegomi@gmail.com] > >> Sent: Wednesday, April 14, 2010 3:18 PM > >> To: Mitani > >> Cc: Randy Dunlap; ltp-list@lists.sourceforge.net > >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > >> > >> On Tue, Apr 13, 2010 at 7:17 PM, Mitani <mitani@ryobi.co.jp> wrote: > >> > Hi Randy, > >> > > >> > I couldn't notice a misspelling. Sorry. > >> > I decided to use "due to" according to your advice. > >> > > >> > May I suggest revised patch? > >> > > > [...] > >> > > >> > Thank you-- > >> > > >> > -Tomonori Mitani > >> > > >> > > >> >> -----Original Message----- > >> >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] > >> >> Sent: Wednesday, April 14, 2010 12:04 AM > >> >> To: Mitani > >> >> Cc: ltp-list@lists.sourceforge.net > >> >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > >> >> > >> >> On 04/12/10 23:58, Mitani wrote: > >> >> > ------------ > >> >> > a) All tests: > >> >> > "TBROK : Test cannot be continued owning to sufficient > >> >> availability of > >> >> > Hugepages on the system" > >> >> > > >> >> > b) 2), 3), 5), 6), 8), 10), 11) tests: > >> >> > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal > attempted" > >> >> > ------------ > >> >> > > >> >> > Both case a) and case b) are caused by the same reason. > >> >> > > >> >> > All of case a) failures occured at the following points (for > >> example > >> >> > hugemmap04): > >> >> > ------------<hugemmap04.c - main()> > >> >> > /* Check number of hugepages */ > >> >> > if (get_no_of_hugepages() <= 0 || hugepages_size() > <= > >> 0) > >> >> > tst_brkm(TBROK, cleanup, "Test cannot be > >> continued > >> >> owning to > >> >> > \ > >> >> > sufficient availability > of > >> >> Hugepages on the > >> >> > system"); > >> >> > ------------ > >> >> > > >> >> > I found out that "HugePages_Total" parameter of "/proc/meminfo" > >> file > >> >> > is set to "0". This caused above TBROK failure. It is environment > >> >> problem. > >> >> > > >> >> > But, in this case, tests must not return with TBROK, but with > TCONF, > >> >> > I think. > >> >> > >> >> That makes sense to me. > >> >> > >> >> > And, in case b), these tests try to delete "TESTDIR" directory > >> by > >> >> > calling "tst_rmdir()" function in "cleanup()" function. > >> >> > But, "TESTDIR" never set if "tst_tmpdir()" function isn't > called. > >> >> > I think that case b)'s tests must not call cleanup() function. > >> >> > > >> >> > > >> >> > I want to suggest following patch. > >> >> > > >> >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > > Sorry to ask again, but Gmail always mangles patches. Could you > please attach it as a file? > Thanks, > -Garrett Sorry. I attach a patch file. Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> Regards-- -Tomonori Mitani [-- Attachment #2: hugetlb.patch --] [-- Type: application/octet-stream, Size: 7660 bytes --] --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-14 16:40:25.000000000 +0900 @@ -127,8 +127,7 @@ /* Check number of hugepages */ if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to \ - sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); /* Perform global setup for test */ setup(); --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-14 16:48:54.000000000 +0900 @@ -105,7 +105,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-14 16:49:15.000000000 +0900 @@ -102,7 +102,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-14 16:49:31.000000000 +0900 @@ -86,7 +86,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-14 16:50:16.000000000 +0900 @@ -130,7 +130,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-14 16:50:28.000000000 +0900 @@ -102,7 +102,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-14 16:50:40.000000000 +0900 @@ -105,7 +105,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-14 16:51:11.000000000 +0900 @@ -87,7 +87,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-14 16:51:34.000000000 +0900 @@ -82,7 +82,7 @@ /* The following loop checks looping state if -i option given */ if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-14 16:51:45.000000000 +0900 @@ -84,7 +84,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-14 16:51:55.000000000 +0900 @@ -85,7 +85,7 @@ /* The following loop checks looping state if -i option given */ if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-14 16:52:10.000000000 +0900 @@ -86,7 +86,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; [-- 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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-15 0:56 ` Mitani @ 2010-04-15 6:54 ` Rishikesh K Rajak 2010-04-15 8:42 ` Garrett Cooper 0 siblings, 1 reply; 17+ messages in thread From: Rishikesh K Rajak @ 2010-04-15 6:54 UTC (permalink / raw) To: Mitani; +Cc: ltp-list, kamimura On Thu, Apr 15, 2010 at 09:56:22AM +0900, Mitani wrote: > > > -----Original Message----- > > From: Garrett Cooper [mailto:yanegomi@gmail.com] > > Sent: Wednesday, April 14, 2010 6:31 PM > > To: Mitani > > Cc: ltp-list@lists.sourceforge.net > > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > > > > On Wed, Apr 14, 2010 at 1:58 AM, Mitani <mitani@ryobi.co.jp> wrote: > > >> -----Original Message----- > > >> From: Garrett Cooper [mailto:yanegomi@gmail.com] > > >> Sent: Wednesday, April 14, 2010 3:18 PM > > >> To: Mitani > > >> Cc: Randy Dunlap; ltp-list@lists.sourceforge.net > > >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > > >> > > >> On Tue, Apr 13, 2010 at 7:17 PM, Mitani <mitani@ryobi.co.jp> wrote: > > >> > Hi Randy, > > >> > > > >> > I couldn't notice a misspelling. Sorry. > > >> > I decided to use "due to" according to your advice. > > >> > > > >> > May I suggest revised patch? > > >> > > > > [...] > > >> > > > >> > Thank you-- > > >> > > > >> > -Tomonori Mitani > > >> > > > >> > > > >> >> -----Original Message----- > > >> >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] > > >> >> Sent: Wednesday, April 14, 2010 12:04 AM > > >> >> To: Mitani > > >> >> Cc: ltp-list@lists.sourceforge.net > > >> >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > > >> >> > > >> >> On 04/12/10 23:58, Mitani wrote: > > >> >> > ------------ > > >> >> > a) All tests: > > >> >> > "TBROK : Test cannot be continued owning to sufficient > > >> >> availability of > > >> >> > Hugepages on the system" > > >> >> > > > >> >> > b) 2), 3), 5), 6), 8), 10), 11) tests: > > >> >> > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal > > attempted" > > >> >> > ------------ > > >> >> > > > >> >> > Both case a) and case b) are caused by the same reason. > > >> >> > > > >> >> > All of case a) failures occured at the following points (for > > >> example > > >> >> > hugemmap04): > > >> >> > ------------<hugemmap04.c - main()> > > >> >> > /* Check number of hugepages */ > > >> >> > if (get_no_of_hugepages() <= 0 || hugepages_size() > > <= > > >> 0) > > >> >> > tst_brkm(TBROK, cleanup, "Test cannot be > > >> continued > > >> >> owning to > > >> >> > \ > > >> >> > sufficient availability > > of > > >> >> Hugepages on the > > >> >> > system"); > > >> >> > ------------ > > >> >> > > > >> >> > I found out that "HugePages_Total" parameter of "/proc/meminfo" > > >> file > > >> >> > is set to "0". This caused above TBROK failure. It is environment > > >> >> problem. > > >> >> > > > >> >> > But, in this case, tests must not return with TBROK, but with > > TCONF, > > >> >> > I think. > > >> >> > > >> >> That makes sense to me. > > >> >> > > >> >> > And, in case b), these tests try to delete "TESTDIR" directory > > >> by > > >> >> > calling "tst_rmdir()" function in "cleanup()" function. > > >> >> > But, "TESTDIR" never set if "tst_tmpdir()" function isn't > > called. > > >> >> > I think that case b)'s tests must not call cleanup() function. > > >> >> > > > >> >> > > > >> >> > I want to suggest following patch. > > >> >> > > > >> >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > > > > Sorry to ask again, but Gmail always mangles patches. Could you > > please attach it as a file? > > Thanks, > > -Garrett > > > Sorry. > I attach a patch 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 > ------------------------------------------------------------------------------ > 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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-15 6:54 ` Rishikesh K Rajak @ 2010-04-15 8:42 ` Garrett Cooper 2010-04-16 1:33 ` Mitani 0 siblings, 1 reply; 17+ messages in thread From: Garrett Cooper @ 2010-04-15 8:42 UTC (permalink / raw) To: Mitani, Garrett Cooper, ltp-list, kamimura On Wed, Apr 14, 2010 at 11:54 PM, Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> wrote: > On Thu, Apr 15, 2010 at 09:56:22AM +0900, Mitani wrote: >> >> > -----Original Message----- >> > From: Garrett Cooper [mailto:yanegomi@gmail.com] >> > Sent: Wednesday, April 14, 2010 6:31 PM >> > To: Mitani >> > Cc: ltp-list@lists.sourceforge.net >> > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> > >> > On Wed, Apr 14, 2010 at 1:58 AM, Mitani <mitani@ryobi.co.jp> wrote: >> > >> -----Original Message----- >> > >> From: Garrett Cooper [mailto:yanegomi@gmail.com] >> > >> Sent: Wednesday, April 14, 2010 3:18 PM >> > >> To: Mitani >> > >> Cc: Randy Dunlap; ltp-list@lists.sourceforge.net >> > >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> > >> >> > >> On Tue, Apr 13, 2010 at 7:17 PM, Mitani <mitani@ryobi.co.jp> wrote: >> > >> > Hi Randy, >> > >> > >> > >> > I couldn't notice a misspelling. Sorry. >> > >> > I decided to use "due to" according to your advice. >> > >> > >> > >> > May I suggest revised patch? >> > >> > >> > > [...] >> > >> > >> > >> > Thank you-- >> > >> > >> > >> > -Tomonori Mitani >> > >> > >> > >> > >> > >> >> -----Original Message----- >> > >> >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] >> > >> >> Sent: Wednesday, April 14, 2010 12:04 AM >> > >> >> To: Mitani >> > >> >> Cc: ltp-list@lists.sourceforge.net >> > >> >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> > >> >> >> > >> >> On 04/12/10 23:58, Mitani wrote: >> > >> >> > ------------ >> > >> >> > a) All tests: >> > >> >> > "TBROK : Test cannot be continued owning to sufficient >> > >> >> availability of >> > >> >> > Hugepages on the system" >> > >> >> > >> > >> >> > b) 2), 3), 5), 6), 8), 10), 11) tests: >> > >> >> > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal >> > attempted" >> > >> >> > ------------ >> > >> >> > >> > >> >> > Both case a) and case b) are caused by the same reason. >> > >> >> > >> > >> >> > All of case a) failures occured at the following points (for >> > >> example >> > >> >> > hugemmap04): >> > >> >> > ------------<hugemmap04.c - main()> >> > >> >> > /* Check number of hugepages */ >> > >> >> > if (get_no_of_hugepages() <= 0 || hugepages_size() >> > <= >> > >> 0) >> > >> >> > tst_brkm(TBROK, cleanup, "Test cannot be >> > >> continued >> > >> >> owning to >> > >> >> > \ >> > >> >> > sufficient availability >> > of >> > >> >> Hugepages on the >> > >> >> > system"); >> > >> >> > ------------ >> > >> >> > >> > >> >> > I found out that "HugePages_Total" parameter of "/proc/meminfo" >> > >> file >> > >> >> > is set to "0". This caused above TBROK failure. It is environment >> > >> >> problem. >> > >> >> > >> > >> >> > But, in this case, tests must not return with TBROK, but with >> > TCONF, >> > >> >> > I think. >> > >> >> >> > >> >> That makes sense to me. >> > >> >> >> > >> >> > And, in case b), these tests try to delete "TESTDIR" directory >> > >> by >> > >> >> > calling "tst_rmdir()" function in "cleanup()" function. >> > >> >> > But, "TESTDIR" never set if "tst_tmpdir()" function isn't >> > called. >> > >> >> > I think that case b)'s tests must not call cleanup() function. >> > >> >> > >> > >> >> > >> > >> >> > I want to suggest following patch. >> > >> >> > >> > >> >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> >> > >> > Sorry to ask again, but Gmail always mangles patches. Could you >> > please attach it as a file? >> > Thanks, >> > -Garrett >> >> >> Sorry. >> I attach a patch file. > > > Applied to next branch. Will wait for someone to Acked/test it before merging to > master. Inspecting the files more closely, here all cases should be tst_exit, not cleanup. Otherwise it's going to do some operations not required as setup hasn't be run yet. Thanks, -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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-15 8:42 ` Garrett Cooper @ 2010-04-16 1:33 ` Mitani 2010-04-16 5:15 ` Garrett Cooper 0 siblings, 1 reply; 17+ messages in thread From: Mitani @ 2010-04-16 1:33 UTC (permalink / raw) To: 'Garrett Cooper'; +Cc: ltp-list > -----Original Message----- > From: Garrett Cooper [mailto:yanegomi@gmail.com] > Sent: Thursday, April 15, 2010 5:43 PM > To: Mitani; Garrett Cooper; ltp-list@lists.sourceforge.net; > kamimura@ryobi.co.jp > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > > On Wed, Apr 14, 2010 at 11:54 PM, Rishikesh K Rajak > <risrajak@linux.vnet.ibm.com> wrote: > > On Thu, Apr 15, 2010 at 09:56:22AM +0900, Mitani wrote: > >> > >> > -----Original Message----- > >> > From: Garrett Cooper [mailto:yanegomi@gmail.com] > >> > Sent: Wednesday, April 14, 2010 6:31 PM > >> > To: Mitani > >> > Cc: ltp-list@lists.sourceforge.net > >> > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > >> > > >> > On Wed, Apr 14, 2010 at 1:58 AM, Mitani <mitani@ryobi.co.jp> wrote: > >> > >> -----Original Message----- > >> > >> From: Garrett Cooper [mailto:yanegomi@gmail.com] > >> > >> Sent: Wednesday, April 14, 2010 3:18 PM > >> > >> To: Mitani > >> > >> Cc: Randy Dunlap; ltp-list@lists.sourceforge.net > >> > >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > >> > >> > >> > >> On Tue, Apr 13, 2010 at 7:17 PM, Mitani <mitani@ryobi.co.jp> > wrote: > >> > >> > Hi Randy, > >> > >> > > >> > >> > I couldn't notice a misspelling. Sorry. > >> > >> > I decided to use "due to" according to your advice. > >> > >> > > >> > >> > May I suggest revised patch? > >> > >> > > >> > > [...] > >> > >> > > >> > >> > Thank you-- > >> > >> > > >> > >> > -Tomonori Mitani > >> > >> > > >> > >> > > >> > >> >> -----Original Message----- > >> > >> >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] > >> > >> >> Sent: Wednesday, April 14, 2010 12:04 AM > >> > >> >> To: Mitani > >> > >> >> Cc: ltp-list@lists.sourceforge.net > >> > >> >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > >> > >> >> > >> > >> >> On 04/12/10 23:58, Mitani wrote: > >> > >> >> > ------------ > >> > >> >> > a) All tests: > >> > >> >> > "TBROK : Test cannot be continued owning to sufficient > >> > >> >> availability of > >> > >> >> > Hugepages on the system" > >> > >> >> > > >> > >> >> > b) 2), 3), 5), 6), 8), 10), 11) tests: > >> > >> >> > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal > >> > attempted" > >> > >> >> > ------------ > >> > >> >> > > >> > >> >> > Both case a) and case b) are caused by the same reason. > >> > >> >> > > >> > >> >> > All of case a) failures occured at the following points > (for > >> > >> example > >> > >> >> > hugemmap04): > >> > >> >> > ------------<hugemmap04.c - main()> > >> > >> >> > /* Check number of hugepages */ > >> > >> >> > if (get_no_of_hugepages() <= 0 || > hugepages_size() > >> > <= > >> > >> 0) > >> > >> >> > tst_brkm(TBROK, cleanup, "Test cannot > be > >> > >> continued > >> > >> >> owning to > >> > >> >> > \ > >> > >> >> > sufficient > availability > >> > of > >> > >> >> Hugepages on the > >> > >> >> > system"); > >> > >> >> > ------------ > >> > >> >> > > >> > >> >> > I found out that "HugePages_Total" parameter of > "/proc/meminfo" > >> > >> file > >> > >> >> > is set to "0". This caused above TBROK failure. It is > environment > >> > >> >> problem. > >> > >> >> > > >> > >> >> > But, in this case, tests must not return with TBROK, but > with > >> > TCONF, > >> > >> >> > I think. > >> > >> >> > >> > >> >> That makes sense to me. > >> > >> >> > >> > >> >> > And, in case b), these tests try to delete "TESTDIR" > directory > >> > >> by > >> > >> >> > calling "tst_rmdir()" function in "cleanup()" function. > >> > >> >> > But, "TESTDIR" never set if "tst_tmpdir()" function isn't > >> > called. > >> > >> >> > I think that case b)'s tests must not call cleanup() > function. > >> > >> >> > > >> > >> >> > > >> > >> >> > I want to suggest following patch. > >> > >> >> > > >> > >> >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > >> > > >> > Sorry to ask again, but Gmail always mangles patches. Could > you > >> > please attach it as a file? > >> > Thanks, > >> > -Garrett > >> > >> > >> Sorry. > >> I attach a patch file. > > > > > > Applied to next branch. Will wait for someone to Acked/test it before > merging to > > master. > > Inspecting the files more closely, here all cases should be > tst_exit, not cleanup. Otherwise it's going to do some operations not > required as setup hasn't be run yet. > Thanks, > -Garrett HI, There is a problem. In hugeshmget01.c, setup() calling is posted before than the judgment of hugepages support: ------------ setup(); /* global setup */ /* The following loop checks looping state if -i option given */ if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient avail ability of Hugepages on the system"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; ------------ Therefore, with this order of processing, clean of setup is necessary, I think Can setup() calling be replaced after the judgment of hugepages support? Perhaps, it's OK, I think ... Regards-- -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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-16 1:33 ` Mitani @ 2010-04-16 5:15 ` Garrett Cooper 0 siblings, 0 replies; 17+ messages in thread From: Garrett Cooper @ 2010-04-16 5:15 UTC (permalink / raw) To: Mitani; +Cc: ltp-list On Thu, Apr 15, 2010 at 6:33 PM, Mitani <mitani@ryobi.co.jp> wrote: > >> -----Original Message----- >> From: Garrett Cooper [mailto:yanegomi@gmail.com] >> Sent: Thursday, April 15, 2010 5:43 PM >> To: Mitani; Garrett Cooper; ltp-list@lists.sourceforge.net; >> kamimura@ryobi.co.jp >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> >> On Wed, Apr 14, 2010 at 11:54 PM, Rishikesh K Rajak >> <risrajak@linux.vnet.ibm.com> wrote: >> > On Thu, Apr 15, 2010 at 09:56:22AM +0900, Mitani wrote: >> >> >> >> > -----Original Message----- >> >> > From: Garrett Cooper [mailto:yanegomi@gmail.com] >> >> > Sent: Wednesday, April 14, 2010 6:31 PM >> >> > To: Mitani >> >> > Cc: ltp-list@lists.sourceforge.net >> >> > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> >> > >> >> > On Wed, Apr 14, 2010 at 1:58 AM, Mitani <mitani@ryobi.co.jp> wrote: >> >> > >> -----Original Message----- >> >> > >> From: Garrett Cooper [mailto:yanegomi@gmail.com] >> >> > >> Sent: Wednesday, April 14, 2010 3:18 PM >> >> > >> To: Mitani >> >> > >> Cc: Randy Dunlap; ltp-list@lists.sourceforge.net >> >> > >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> >> > >> >> >> > >> On Tue, Apr 13, 2010 at 7:17 PM, Mitani <mitani@ryobi.co.jp> >> wrote: >> >> > >> > Hi Randy, >> >> > >> > >> >> > >> > I couldn't notice a misspelling. Sorry. >> >> > >> > I decided to use "due to" according to your advice. >> >> > >> > >> >> > >> > May I suggest revised patch? >> >> > >> > >> >> > > [...] >> >> > >> > >> >> > >> > Thank you-- >> >> > >> > >> >> > >> > -Tomonori Mitani >> >> > >> > >> >> > >> > >> >> > >> >> -----Original Message----- >> >> > >> >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] >> >> > >> >> Sent: Wednesday, April 14, 2010 12:04 AM >> >> > >> >> To: Mitani >> >> > >> >> Cc: ltp-list@lists.sourceforge.net >> >> > >> >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> >> > >> >> >> >> > >> >> On 04/12/10 23:58, Mitani wrote: >> >> > >> >> > ------------ >> >> > >> >> > a) All tests: >> >> > >> >> > "TBROK : Test cannot be continued owning to sufficient >> >> > >> >> availability of >> >> > >> >> > Hugepages on the system" >> >> > >> >> > >> >> > >> >> > b) 2), 3), 5), 6), 8), 10), 11) tests: >> >> > >> >> > "TWARN : tst_rmdir(): TESTDIR was NULL; no removal >> >> > attempted" >> >> > >> >> > ------------ >> >> > >> >> > >> >> > >> >> > Both case a) and case b) are caused by the same reason. >> >> > >> >> > >> >> > >> >> > All of case a) failures occured at the following points >> (for >> >> > >> example >> >> > >> >> > hugemmap04): >> >> > >> >> > ------------<hugemmap04.c - main()> >> >> > >> >> > /* Check number of hugepages */ >> >> > >> >> > if (get_no_of_hugepages() <= 0 || >> hugepages_size() >> >> > <= >> >> > >> 0) >> >> > >> >> > tst_brkm(TBROK, cleanup, "Test cannot >> be >> >> > >> continued >> >> > >> >> owning to >> >> > >> >> > \ >> >> > >> >> > sufficient >> availability >> >> > of >> >> > >> >> Hugepages on the >> >> > >> >> > system"); >> >> > >> >> > ------------ >> >> > >> >> > >> >> > >> >> > I found out that "HugePages_Total" parameter of >> "/proc/meminfo" >> >> > >> file >> >> > >> >> > is set to "0". This caused above TBROK failure. It is >> environment >> >> > >> >> problem. >> >> > >> >> > >> >> > >> >> > But, in this case, tests must not return with TBROK, but >> with >> >> > TCONF, >> >> > >> >> > I think. >> >> > >> >> >> >> > >> >> That makes sense to me. >> >> > >> >> >> >> > >> >> > And, in case b), these tests try to delete "TESTDIR" >> directory >> >> > >> by >> >> > >> >> > calling "tst_rmdir()" function in "cleanup()" function. >> >> > >> >> > But, "TESTDIR" never set if "tst_tmpdir()" function isn't >> >> > called. >> >> > >> >> > I think that case b)'s tests must not call cleanup() >> function. >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > I want to suggest following patch. >> >> > >> >> > >> >> > >> >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> >> >> > >> >> > Sorry to ask again, but Gmail always mangles patches. Could >> you >> >> > please attach it as a file? >> >> > Thanks, >> >> > -Garrett >> >> >> >> >> >> Sorry. >> >> I attach a patch file. >> > >> > >> > Applied to next branch. Will wait for someone to Acked/test it before >> merging to >> > master. >> >> Inspecting the files more closely, here all cases should be >> tst_exit, not cleanup. Otherwise it's going to do some operations not >> required as setup hasn't be run yet. >> Thanks, >> -Garrett > > HI, > > There is a problem. > In hugeshmget01.c, setup() calling is posted before than the judgment > of hugepages support: > ------------ > setup(); /* global setup */ > > /* The following loop checks looping state if -i option given */ > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient avail > ability of Hugepages on the system"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() > * 1024) / 2 ; > ------------ > > Therefore, with this order of processing, clean of setup is necessary, > I think > > Can setup() calling be replaced after the judgment of hugepages support? > Perhaps, it's OK, I think ... Problem `solved' :). Could you please change the cleanup calls to use setup wherever necessary (or perhaps move the hugepages availability check into setup, as it's basically a setup item anyhow)? Thanks, -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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-14 8:58 ` Mitani 2010-04-14 9:18 ` Ryan Wang 2010-04-14 9:30 ` Garrett Cooper @ 2010-04-14 15:19 ` Randy Dunlap 2010-04-16 2:42 ` Mitani 2 siblings, 1 reply; 17+ messages in thread From: Randy Dunlap @ 2010-04-14 15:19 UTC (permalink / raw) To: Mitani; +Cc: ltp-list On Wed, 14 Apr 2010 17:58:17 +0900 Mitani wrote: > Hi, > > I suggest new patch. > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> This one is OK with me also, but... Is it possible to determine the difference between a kernel that does not support hugepages at all and a kernel that does support hugepages but just does not have enough of them allocated? or maybe we don't care about this difference. Do we? > ============ > --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-14 > 16:40:25.000000000 +0900 > @@ -127,8 +127,7 @@ > > /* Check number of hugepages */ > if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > \ > - sufficient availability of Hugepages on the > system"); > + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); > > /* Perform global setup for test */ > setup(); > --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-14 > 16:48:54.000000000 +0900 > @@ -105,7 +105,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-14 > 16:49:15.000000000 +0900 > @@ -102,7 +102,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-14 > 16:49:31.000000000 +0900 > @@ -86,7 +86,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-14 > 16:50:16.000000000 +0900 > @@ -130,7 +130,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-14 > 16:50:28.000000000 +0900 > @@ -102,7 +102,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-14 > 16:50:40.000000000 +0900 > @@ -105,7 +105,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-14 > 16:51:11.000000000 +0900 > @@ -87,7 +87,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-14 > 16:51:34.000000000 +0900 > @@ -82,7 +82,7 @@ > > /* The following loop checks looping state if -i option given */ > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-14 > 16:51:45.000000000 +0900 > @@ -84,7 +84,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-14 > 16:51:55.000000000 +0900 > @@ -85,7 +85,7 @@ > > /* The following loop checks looping state if -i option given */ > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, tst_exit, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-01 > 15:23:09.000000000 +0900 > +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-14 > 16:52:10.000000000 +0900 > @@ -86,7 +86,7 @@ > } > > if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) > - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to > sufficient availability of Hugepages on the system"); > + tst_brkm(TCONF, cleanup, "Not enough available Hugepages"); > else > huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * > hugepages_size() * 1024) / 2 ; > > ============ --- ~Randy ------------------------------------------------------------------------------ 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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-14 15:19 ` Randy Dunlap @ 2010-04-16 2:42 ` Mitani 2010-04-16 5:05 ` Garrett Cooper 2010-04-16 15:12 ` Randy Dunlap 0 siblings, 2 replies; 17+ messages in thread From: Mitani @ 2010-04-16 2:42 UTC (permalink / raw) To: 'Randy Dunlap'; +Cc: ltp-list > -----Original Message----- > From: Randy Dunlap [mailto:rdunlap@xenotime.net] > Sent: Thursday, April 15, 2010 12:20 AM > To: Mitani > Cc: 'Garrett Cooper'; ltp-list@lists.sourceforge.net > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > > On Wed, 14 Apr 2010 17:58:17 +0900 Mitani wrote: > > > Hi, > > > > I suggest new patch. > > > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > > This one is OK with me also, but... > > Is it possible to determine the difference between a kernel that does > not support hugepages at all and a kernel that does support hugepages > but just does not have enough of them allocated? > > or maybe we don't care about this difference. Do we? > I cannot give a good opinion because I'm not a creator of these test programs, but ... I think that the difference of test refusal reason isn't so important. How about following message? : ------------ Not support Hugepages or not enough available Hugepages ------------ If users read above message, they will examine a reason by themselves and will do appropriate measures (set an enough hugepages value or gave up this test), I think. Regards-- -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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-16 2:42 ` Mitani @ 2010-04-16 5:05 ` Garrett Cooper 2010-04-16 9:23 ` Mitani 2010-04-16 15:12 ` Randy Dunlap 1 sibling, 1 reply; 17+ messages in thread From: Garrett Cooper @ 2010-04-16 5:05 UTC (permalink / raw) To: Mitani; +Cc: ltp-list, Randy Dunlap On Thu, Apr 15, 2010 at 7:42 PM, Mitani <mitani@ryobi.co.jp> wrote: > >> -----Original Message----- >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] >> Sent: Thursday, April 15, 2010 12:20 AM >> To: Mitani >> Cc: 'Garrett Cooper'; ltp-list@lists.sourceforge.net >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests >> >> On Wed, 14 Apr 2010 17:58:17 +0900 Mitani wrote: >> >> > Hi, >> > >> > I suggest new patch. >> > >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> >> >> This one is OK with me also, but... >> >> Is it possible to determine the difference between a kernel that does >> not support hugepages at all and a kernel that does support hugepages >> but just does not have enough of them allocated? >> >> or maybe we don't care about this difference. Do we? > > I cannot give a good opinion because I'm not a creator of these test > programs, but ... > I think that the difference of test refusal reason isn't so important. > How about following message? : > ------------ > Not support Hugepages or not enough available Hugepages > ------------ > > If users read above message, they will examine a reason by themselves > and will do appropriate measures (set an enough hugepages value or > gave up this test), I think. It's fine as-is. `Zero [supported] hugepages' is the same as `not enough hugepages'. If people can't read the message, and put together the details based on what's in the test output versus the documentation and the source code, they quite frankly shouldn't be running the tests. Thanks, -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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-16 5:05 ` Garrett Cooper @ 2010-04-16 9:23 ` Mitani 0 siblings, 0 replies; 17+ messages in thread From: Mitani @ 2010-04-16 9:23 UTC (permalink / raw) To: 'Garrett Cooper'; +Cc: ltp-list, kamimura [-- Attachment #1: Type: text/plain, Size: 2207 bytes --] > -----Original Message----- > From: Garrett Cooper [mailto:yanegomi@gmail.com] > Sent: Friday, April 16, 2010 2:06 PM > To: Mitani > Cc: Randy Dunlap; ltp-list@lists.sourceforge.net > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > > On Thu, Apr 15, 2010 at 7:42 PM, Mitani <mitani@ryobi.co.jp> wrote: > > > >> -----Original Message----- > >> From: Randy Dunlap [mailto:rdunlap@xenotime.net] > >> Sent: Thursday, April 15, 2010 12:20 AM > >> To: Mitani > >> Cc: 'Garrett Cooper'; ltp-list@lists.sourceforge.net > >> Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > >> > >> On Wed, 14 Apr 2010 17:58:17 +0900 Mitani wrote: > >> > >> > Hi, > >> > > >> > I suggest new patch. > >> > > >> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > >> > >> This one is OK with me also, but... > >> > >> Is it possible to determine the difference between a kernel that > does > >> not support hugepages at all and a kernel that does support hugepages > >> but just does not have enough of them allocated? > >> > >> or maybe we don't care about this difference. Do we? > > > > I cannot give a good opinion because I'm not a creator of these test > > programs, but ... > > I think that the difference of test refusal reason isn't so important. > > How about following message? : > > ------------ > > Not support Hugepages or not enough available Hugepages > > ------------ > > > > If users read above message, they will examine a reason by themselves > > and will do appropriate measures (set an enough hugepages value or > > gave up this test), I think. > > It's fine as-is. `Zero [supported] hugepages' is the same as `not > enough hugepages'. If people can't read the message, and put together > the details based on what's in the test output versus the > documentation and the source code, they quite frankly shouldn't be > running the tests. > Thanks, > -Garrett I made patch for both Hugepages non-support message and "tst_exit()" calling. I attach the patch as a file. Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> Regards-- -Tomonori Mitani [-- Attachment #2: hugetlb.patch --] [-- Type: application/octet-stream, Size: 8367 bytes --] --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c 2010-04-16 14:33:44.000000000 +0900 @@ -127,8 +127,7 @@ /* Check number of hugepages */ if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to \ - sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); /* Perform global setup for test */ setup(); --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 2010-04-16 14:31:56.000000000 +0900 @@ -105,7 +105,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c 2010-04-16 14:32:13.000000000 +0900 @@ -102,7 +102,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c 2010-04-16 14:32:26.000000000 +0900 @@ -86,7 +86,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c 2010-04-16 14:35:10.000000000 +0900 @@ -130,7 +130,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c 2010-04-16 14:35:21.000000000 +0900 @@ -102,7 +102,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c 2010-04-16 14:35:31.000000000 +0900 @@ -105,7 +105,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c 2010-04-16 14:36:39.000000000 +0900 @@ -87,7 +87,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-04-16 14:38:22.000000000 +0900 @@ -78,14 +78,14 @@ tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg); } - setup(); /* global setup */ - /* The following loop checks looping state if -i option given */ if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; + setup(); /* global setup */ + for (lc = 0; TEST_LOOPING(lc); lc++) { /* reset Tst_count in case we are looping */ Tst_count = 0; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c 2010-04-16 14:38:33.000000000 +0900 @@ -84,7 +84,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c 2010-04-16 14:38:49.000000000 +0900 @@ -85,7 +85,7 @@ /* The following loop checks looping state if -i option given */ if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-01 15:23:09.000000000 +0900 +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c 2010-04-16 14:39:00.000000000 +0900 @@ -86,7 +86,7 @@ } if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 ) - tst_brkm(TBROK, cleanup, "Test cannot be continued owning to sufficient availability of Hugepages on the system"); + tst_brkm(TCONF, tst_exit, "Not support Hugepages or not enough available Hugepages"); else huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ; [-- 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] 17+ messages in thread
* Re: [LTP] [PATCH] fix "hugetlb" several tests 2010-04-16 2:42 ` Mitani 2010-04-16 5:05 ` Garrett Cooper @ 2010-04-16 15:12 ` Randy Dunlap 1 sibling, 0 replies; 17+ messages in thread From: Randy Dunlap @ 2010-04-16 15:12 UTC (permalink / raw) To: Mitani; +Cc: ltp-list On Fri, 16 Apr 2010 11:42:39 +0900 Mitani wrote: > > > -----Original Message----- > > From: Randy Dunlap [mailto:rdunlap@xenotime.net] > > Sent: Thursday, April 15, 2010 12:20 AM > > To: Mitani > > Cc: 'Garrett Cooper'; ltp-list@lists.sourceforge.net > > Subject: Re: [LTP] [PATCH] fix "hugetlb" several tests > > > > On Wed, 14 Apr 2010 17:58:17 +0900 Mitani wrote: > > > > > Hi, > > > > > > I suggest new patch. > > > > > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp> > > > > This one is OK with me also, but... > > > > Is it possible to determine the difference between a kernel that does > > not support hugepages at all and a kernel that does support hugepages > > but just does not have enough of them allocated? > > > > or maybe we don't care about this difference. Do we? > > > > > I cannot give a good opinion because I'm not a creator of these test > programs, but ... > I think that the difference of test refusal reason isn't so important. > How about following message? : > ------------ > Not support Hugepages or not enough available Hugepages > ------------ > > If users read above message, they will examine a reason by themselves > and will do appropriate measures (set an enough hugepages value or > gave up this test), I think. It's a better message IMO. If it doesn't cost anything to make the error/problem messages better, then please do it. thanks, --- ~Randy ------------------------------------------------------------------------------ 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] 17+ messages in thread
end of thread, other threads:[~2010-04-16 15:13 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-04-13 6:58 [LTP] [PATCH] fix "hugetlb" several tests Mitani 2010-04-13 15:03 ` Randy Dunlap 2010-04-14 2:17 ` Mitani 2010-04-14 6:17 ` Garrett Cooper 2010-04-14 8:58 ` Mitani 2010-04-14 9:18 ` Ryan Wang 2010-04-14 9:30 ` Garrett Cooper 2010-04-15 0:56 ` Mitani 2010-04-15 6:54 ` Rishikesh K Rajak 2010-04-15 8:42 ` Garrett Cooper 2010-04-16 1:33 ` Mitani 2010-04-16 5:15 ` Garrett Cooper 2010-04-14 15:19 ` Randy Dunlap 2010-04-16 2:42 ` Mitani 2010-04-16 5:05 ` Garrett Cooper 2010-04-16 9:23 ` Mitani 2010-04-16 15:12 ` Randy Dunlap
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox