public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] mem/hugetlb: fix failure of hugemmap03
@ 2009-10-21  3:52 liubo
  2009-10-26 17:02 ` Subrata Modak
  0 siblings, 1 reply; 2+ messages in thread
From: liubo @ 2009-10-21  3:52 UTC (permalink / raw)
  To: ltp-list

1)    In mmap's manual,
The starting address for the new mapping is specified in addr.

So, if mmap's argument "addr" is reachable, the mmap will
creates a new mapping in the virtual address space of the
call-ing process.
The test hugemmap03 will test that a normal page cannot
 be mapped into a high memory region. This infers that "addr"
should be higher for 64-bit mode.


2)    The test use "-I2" option, and this not only causes TFAIL's
loop, but also causes TPASS's loop.
For TFAIL, loop is deserved, nor for TPASS.

This patch fixed these problems.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>

---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
index 892d24b..a07b9aa 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
@@ -55,7 +55,7 @@
 #include "usctest.h"
 
 #define PAGE_SIZE      ((1UL) << 12) 	/* Normal page size */
-#define HIGH_ADDR      (void *)(0x10000000000)
+#define HIGH_ADDR      (void *)(0x1000000000000)
 
 char* TEMPFILE="mmapfile";
 
@@ -130,6 +130,7 @@ main(int ac, char **av)
 			continue;
 		} else {
 			tst_resm(TPASS, "Normal mmap() into high region failed correctly");
+			break;
 		}
 
 		close(fildes);




------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH] mem/hugetlb: fix failure of hugemmap03
  2009-10-21  3:52 [LTP] [PATCH] mem/hugetlb: fix failure of hugemmap03 liubo
@ 2009-10-26 17:02 ` Subrata Modak
  0 siblings, 0 replies; 2+ messages in thread
From: Subrata Modak @ 2009-10-26 17:02 UTC (permalink / raw)
  To: liubo; +Cc: ltp-list

On Wed, 2009-10-21 at 11:52 +0800, liubo wrote: 
> 1)    In mmap's manual,
> The starting address for the new mapping is specified in addr.
> 
> So, if mmap's argument "addr" is reachable, the mmap will
> creates a new mapping in the virtual address space of the
> call-ing process.
> The test hugemmap03 will test that a normal page cannot
>  be mapped into a high memory region. This infers that "addr"
> should be higher for 64-bit mode.
> 
> 
> 2)    The test use "-I2" option, and this not only causes TFAIL's
> loop, but also causes TPASS's loop.
> For TFAIL, loop is deserved, nor for TPASS.
> 
> This patch fixed these problems.
> 
> Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>

Thanks.

Regards--
Subrata

> 
> ---
>  testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
> index 892d24b..a07b9aa 100644
> --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
> +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
> @@ -55,7 +55,7 @@
>  #include "usctest.h"
> 
>  #define PAGE_SIZE      ((1UL) << 12) 	/* Normal page size */
> -#define HIGH_ADDR      (void *)(0x10000000000)
> +#define HIGH_ADDR      (void *)(0x1000000000000)
> 
>  char* TEMPFILE="mmapfile";
> 
> @@ -130,6 +130,7 @@ main(int ac, char **av)
>  			continue;
>  		} else {
>  			tst_resm(TPASS, "Normal mmap() into high region failed correctly");
> +			break;
>  		}
> 
>  		close(fildes);
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
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:[~2009-10-26 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-21  3:52 [LTP] [PATCH] mem/hugetlb: fix failure of hugemmap03 liubo
2009-10-26 17:02 ` Subrata Modak

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