diff options
author | Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> | 2010-04-15 12:04:09 +0530 |
---|---|---|
committer | Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> | 2010-04-15 12:04:09 +0530 |
commit | a9d5600c78943e9e7e1b52c5ec81e9772a47b44f (patch) | |
tree | 2147e4ad889d68a575172beaf085e8eb7ce7aff8 /testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c | |
parent | aabf191024aacc91784593b0d3f8d5fa37434b25 (diff) | |
download | ltp-a9d5600c78943e9e7e1b52c5ec81e9772a47b44f.tar.gz |
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>
Signed-off-by: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>
Diffstat (limited to 'testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c')
-rw-r--r-- | testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c index 928f76a2d..e434082cb 100644 --- a/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c +++ b/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c @@ -102,7 +102,7 @@ int main(int ac, char **av) } 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 ; |