Skip to contentSkip to conversation

fix hugeshmget01

PATCH In review Mitani 2 participants 2 messages Jul 7, 2010 – Jul 10, 2010

lore
Share & tools
lore

Mitani

author
#0 lore raw

PATCH 1/1 fix hugeshmget01

Hi,

Sorry!!

I mistook to make following patch for hugetlb tests:
http://www.mail-archive.com/[email protected]/msg10249.html

After the patch was applied, hugeshmget01 test will FAIL under the condition that hugepages isn't effective.

In this patch, I moved the timing of "setup()" calling after the judgment of hugepages.
------------

        if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char
*)NULL){
                tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
        }

        /* The following loop checks looping state if -i option given */
        if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
             tst_brkm(TCONF, cleanup, "Not enough available Hugepages");
        else
              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *

hugepages_size()
* 1024) / 2 ;

        setup();                        /* global setup */

------------

At first, the "cleanup()" function was called in exit handling when hugepages was not effective.
But I didn't change "cleanup" into "tst_exit".
Therefore, in "cleanup()", exit handling fails to delete a non-existing temporary directory.

I maked patch for the latest git.
I tested it in both conditions that hugepages is effective/ineffective.

============
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-07-04
03:15:03.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-07-05
16:37:41.000000000 +0900
@@ -80,7 +80,7 @@

/* The following loop checks looping state if -i option given */

         if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )

- tst_brkm(TCONF, cleanup, "Not enough available Hugepages");
+ tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
else
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;

============

Regards--

-Tomonori Mitani

testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c +1 -1
@@ -80,7 +80,7 @@
 
 	/* The following loop checks looping state if -i option given */
         if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
-             tst_brkm(TCONF, cleanup, "Not enough available Hugepages");
+             tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
         else             
               huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / 2 ;
         

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw
Quoted 37 lines · Mitani

Hi,

Sorry!!

I mistook to make following patch for hugetlb tests:
http://www.mail-archive.com/[email protected]/msg10249.html

After the patch was applied, hugeshmget01 test will FAIL under the condition that hugepages isn't effective.

In this patch, I moved the timing of "setup()" calling after the judgment of hugepages.
------------

        if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char
*)NULL){
                tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
        }

        /* The following loop checks looping state if -i option given */
        if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
             tst_brkm(TCONF, cleanup, "Not enough available Hugepages");
        else
              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *

hugepages_size()
* 1024) / 2 ;

        setup();                        /* global setup */

------------

At first, the "cleanup()" function was called in exit handling when hugepages was not effective.
But I didn't change "cleanup" into "tst_exit".
Therefore, in "cleanup()", exit handling fails to delete a non-existing temporary directory.

Quoted 4 lines

I maked patch for the latest git.
I tested it in both conditions that hugepages is effective/ineffective.

Thanks.

Regards--
Subrata

Quoted 20 lines

============
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-07-04
03:15:03.000000000 +0900
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c 2010-07-05
16:37:41.000000000 +0900

testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c +1 -1
@@ -80,7 +80,7 @@
 
 	/* The following loop checks looping state if -i option given */
         if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
-             tst_brkm(TCONF, cleanup, "Not enough available Hugepages");
+             tst_brkm(TCONF, tst_exit, "Not enough available Hugepages");
         else             
               huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
 hugepages_size() * 1024) / 2 ;

============

Quoted 8 lines

Regards--

-Tomonori Mitani
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list