* [LTP] ltp: vma03 fix the alginment of page size
@ 2015-06-03 6:11 cdong
2015-06-03 6:25 ` Wei, Jiangang
0 siblings, 1 reply; 2+ messages in thread
From: cdong @ 2015-06-03 6:11 UTC (permalink / raw)
To: Ltp-list
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
Hi,
There is a patch to fix vma03 test case,the below information is
detail it:
the offset the parameter of mmap2() doesn't align the page
size,but,this parameter
allow must be a multiple of the page size as returned by
sysconf(_SC_PAGE_SIZE).
meanwhile offset * 4096 must be a multiple of the system page
size,so modify
the input param of offset pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
Regards,
Apollo
[-- Attachment #2: 0001-ltp-vma03-fix-the-alginment-of-page-size.patch --]
[-- Type: text/x-patch, Size: 1217 bytes --]
From 6e60e9d4f27d36cdd369e7d7a046da49e3f17fd6 Mon Sep 17 00:00:00 2001
From: Chuang Dong <Chuang.Dong@windriver.com>
Date: Wed, 3 Jun 2015 13:27:53 +0800
Subject: [PATCH] ltp: vma03 fix the alginment of page size
the offset the param of mmap2() doesn't align the page size,but,
this param allow must be a multiple of the page size as returned
by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a
multiple of the system page size,so modify the input param of offset
pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
Upstream-Status: Submitted
Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com>
---
testcases/kernel/mem/vma/vma03.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
index ad8a7b4..a539233 100644
--- a/testcases/kernel/mem/vma/vma03.c
+++ b/testcases/kernel/mem/vma/vma03.c
@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
if (fd == -1)
tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE);
- pgoff = ULONG_MAX - 1;
+ pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE,
fd, pgoff);
if (map == MAP_FAILED)
--
1.8.5.2.233.g932f7e4
[-- Attachment #3: Type: text/plain, Size: 79 bytes --]
------------------------------------------------------------------------------
[-- 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 related [flat|nested] 2+ messages in thread* Re: [LTP] ltp: vma03 fix the alginment of page size
2015-06-03 6:11 [LTP] ltp: vma03 fix the alginment of page size cdong
@ 2015-06-03 6:25 ` Wei, Jiangang
0 siblings, 0 replies; 2+ messages in thread
From: Wei, Jiangang @ 2015-06-03 6:25 UTC (permalink / raw)
To: chuang.dong@windriver.com; +Cc: Ltp-list@lists.sourceforge.net
Hi,
Maybe you had to fix your typo in commit message.
You can using 'set spell' to check it before pushing it.
Regards,
Wei
On Wed, 2015-06-03 at 14:11 +0800, cdong wrote:
> Hi,
> There is a patch to fix vma03 test case,the below information is
> detail it:
>
> the offset the parameter of mmap2() doesn't align the page
> size,but,this parameter
> allow must be a multiple of the page size as returned by
> sysconf(_SC_PAGE_SIZE).
> meanwhile offset * 4096 must be a multiple of the system page
> size,so modify
> the input param of offset pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
>
> Regards,
> Apollo
> ------------------------------------------------------------------------------
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
_______________________________________________
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:[~2015-06-03 6:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-03 6:11 [LTP] ltp: vma03 fix the alginment of page size cdong
2015-06-03 6:25 ` Wei, Jiangang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox