From: Wang Sheng-Hui <shhuiw@gmail.com>
To: ltp-list@lists.sourceforge.net, shubham@linux.vnet.ibm.com
Subject: [LTP] [PATCH] testcases/kernel/mem/vma/vma01.c: fix the right start/end memory address
Date: Sun, 25 Mar 2012 01:30:08 +0800 [thread overview]
Message-ID: <4F6E04A0.10305@gmail.com> (raw)
For a VMA with memory range 6*ps, regardless of it's two 3*ps or
one single 6*ps, t is the start addr of the vma, u = t + 3*ps, and
the end addr is t + 6*ps.
For the check process, x should start from t, not u, and later check
for the second 3*ps should resume from u.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
testcases/kernel/mem/vma/vma01.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/testcases/kernel/mem/vma/vma01.c b/testcases/kernel/mem/vma/vma01.c
index 398d7a1..4b66121 100644
--- a/testcases/kernel/mem/vma/vma01.c
+++ b/testcases/kernel/mem/vma/vma01.c
@@ -112,12 +112,12 @@ static void check_vma(void)
printf("child : u = %p\n", u);
memset(u, 2, ps);
- x = get_end_addr(u, MAPS_FILE);
- if (x == u + 6*ps)
+ x = get_end_addr(t, MAPS_FILE);
+ if (x == t + 6*ps)
exit(1);
- if (x == u + 3*ps) {
- y = get_end_addr(x, MAPS_FILE);
- if (y == x + 3*ps)
+ if (x == u) {
+ y = get_end_addr(u, MAPS_FILE);
+ if (y == u + 3*ps)
exit(0);
}
exit(255);
--
1.7.1
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next reply other threads:[~2012-03-24 17:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-24 17:30 Wang Sheng-Hui [this message]
2012-04-01 10:17 ` [LTP] [PATCH] testcases/kernel/mem/vma/vma01.c: fix the right start/end memory address Caspar Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F6E04A0.10305@gmail.com \
--to=shhuiw@gmail.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=shubham@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.