From 926cac4bafd70eb9cac36e96609c2d509f11cadd Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 2 Mar 2001 06:52:06 +0000 Subject: [PATCH] added test to make sure area is unmapped --- testing/mmap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/testing/mmap.c b/testing/mmap.c index 8a20e06..38e012e 100644 --- a/testing/mmap.c +++ b/testing/mmap.c @@ -125,6 +125,16 @@ int test_mmap(void) } munmap(map,MAPLEN); + /* test if area is really unmapped */ + for(adr=map;adr<(void *)map+MAPLEN;adr+=PAGE_SIZE){ + ret=test_segfault(adr); + if(ret){ + printf("%p segfaulted (ok)\n",adr); + }else{ + printf("E: %p still mapped\n",adr); + } + } + free(buf); return 0; -- 2.26.2