From 978f77c8fe03b198d8582e5f8f03b1fe00161bd1 Mon Sep 17 00:00:00 2001 From: mycroft Date: Mon, 24 Jan 2000 00:39:17 +0000 Subject: [PATCH] Yet another check. --- regress/sys/uvm/mmap/mmap.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/regress/sys/uvm/mmap/mmap.c b/regress/sys/uvm/mmap/mmap.c index cfc6b11fe76c..ce10a3be3725 100644 --- a/regress/sys/uvm/mmap/mmap.c +++ b/regress/sys/uvm/mmap/mmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: mmap.c,v 1.9 2000/01/24 00:00:25 mycroft Exp $ */ +/* $NetBSD: mmap.c,v 1.10 2000/01/24 00:39:17 mycroft Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -148,7 +148,7 @@ main(argc, argv) * TEST MLOCKALL'ING AN ANONYMOUS MEMORY RANGE. */ - npgs = 8; + npgs = 128; printf(">>> MAPPING %d PAGE ANONYMOUS REGION <<<\n", npgs); @@ -217,6 +217,14 @@ main(argc, argv) printf(" UNLOCKING ALL\n"); + printf(" CHECKING RESIDENCY\n"); + + if (check_residency(addr, npgs) != npgs || + check_residency(addr2, npgs) != npgs) { + printf(" RESIDENCY CHECK FAILED!\n"); + ecode = 1; + } + (void) munlockall(); printf(">>> MADV_FREE'ING SECOND ANONYMOUS REGION <<<\n"); @@ -348,7 +356,7 @@ main(argc, argv) printf(" ZEROING SEGMENT\n"); - memset(addr, 0, npgs * pgsize); + memset(addr, 0xff, npgs * pgsize); printf(" CHECKING RESIDENCY\n");