public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] fix hugeshmget01
@ 2010-07-07  7:31 Mitani
  2010-07-10 18:58 ` Subrata Modak
  0 siblings, 1 reply; 2+ messages in thread
From: Mitani @ 2010-07-07  7:31 UTC (permalink / raw)
  To: ltp-list; +Cc: kamimura

[-- Attachment #1: Type: text/plain, Size: 2025 bytes --]

Hi,


Sorry!!

I mistook to make following patch for hugetlb tests:
http://www.mail-archive.com/ltp-list@lists.sourceforge.net/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.

Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>

============
--- 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

[-- Attachment #2: hugeshmget01.patch --]
[-- Type: application/octet-stream, Size: 651 bytes --]

--- 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 ;
         

[-- Attachment #3: Type: text/plain, Size: 235 bytes --]

------------------------------------------------------------------------------
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

[-- 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] 2+ messages in thread

* Re: [LTP] [PATCH] fix hugeshmget01
  2010-07-07  7:31 [LTP] [PATCH] fix hugeshmget01 Mitani
@ 2010-07-10 18:58 ` Subrata Modak
  0 siblings, 0 replies; 2+ messages in thread
From: Subrata Modak @ 2010-07-10 18:58 UTC (permalink / raw)
  To: Mitani; +Cc: ltp-list, kamimura

On Wed, 2010-07-07 at 16:31 +0900, Mitani wrote: 
> Hi,
> 
> 
> Sorry!!
> 
> I mistook to make following patch for hugetlb tests:
> http://www.mail-archive.com/ltp-list@lists.sourceforge.net/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.
> 
> Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>

Thanks.

Regards--
Subrata

> 
> ============
> --- 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
> ------------------------------------------------------------------------------
> 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 Ltp-list@lists.sourceforge.net 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-10 18:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-07  7:31 [LTP] [PATCH] fix hugeshmget01 Mitani
2010-07-10 18:58 ` Subrata Modak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox