addr v has been proved unless in test case, so remove it in this patch.
Also a tst_resm/printf would call mmap() which might cause noise in this
test, remove it as well.

Signed-off-by: Caspar Zhang <[email protected]>
---
 testcases/kernel/mem/vma/vma01.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/testcases/kernel/mem/vma/vma01.c b/testcases/kernel/mem/vma/vma01.c
index fb121f2..398d7a1 100644
--- a/testcases/kernel/mem/vma/vma01.c
+++ b/testcases/kernel/mem/vma/vma01.c
@@ -90,20 +90,13 @@ int main(int argc, char **argv)
 static void check_vma(void)
 {
 	int status;
-	void *t, *u, *v, *x, *y;
+	void *t, *u, *x, *y;
 
 	t = mmap(NULL, 3*ps, PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, 0, 0);
 	if (t == MAP_FAILED)
 		tst_brkm(TBROK|TERRNO, cleanup, "mmap");
-	tst_resm(TINFO, "t = %p", t);
 	memset(t, 1, ps);
 
-	v = mmap(NULL, 3*ps, PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, 0, 0);
-	if (v == MAP_FAILED)
-		tst_brkm(TBROK|TERRNO, cleanup, "mmap");
-	tst_resm(TINFO, "v = %p", v);
-	memset(v, 2, ps);
-
 	switch (fork()) {
 	case -1:
 		tst_brkm(TBROK|TERRNO, cleanup, "fork");
@@ -115,8 +108,9 @@ static void check_vma(void)
 			perror("mmap failed.\n");
 			exit(255);
 		}
-		printf("u = %p\n", u);
-		memset(u, 2, 4096);
+		printf("parent: t = %p\n", t);
+		printf("child : u = %p\n", u);
+		memset(u, 2, ps);
 
 		x = get_end_addr(u, MAPS_FILE);
 		if (x == u + 6*ps)
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to