Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/regress/sys/uvm/mmap Add more check_residency() calls.



details:   https://anonhg.NetBSD.org/src/rev/5824e2418095
branches:  trunk
changeset: 481159:5824e2418095
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Mon Jan 24 00:00:25 2000 +0000

description:
Add more check_residency() calls.

diffstat:

 regress/sys/uvm/mmap/mmap.c |  24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r ac2f8b6262e2 -r 5824e2418095 regress/sys/uvm/mmap/mmap.c
--- a/regress/sys/uvm/mmap/mmap.c       Sun Jan 23 23:59:21 2000 +0000
+++ b/regress/sys/uvm/mmap/mmap.c       Mon Jan 24 00:00:25 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mmap.c,v 1.8 1999/08/06 23:40:10 thorpej Exp $ */
+/*     $NetBSD: mmap.c,v 1.9 2000/01/24 00:00:25 mycroft Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -159,7 +159,10 @@
 
        printf("    CHECKING RESIDENCY\n");
 
-       (void) check_residency(addr, npgs);
+       if (check_residency(addr, npgs) != 0) {
+               printf("    RESIDENCY CHECK FAILED!\n");
+               ecode = 1;
+       }
 
        printf("    LOCKING ALL - CURRENT and FUTURE\n");
 
@@ -244,7 +247,14 @@
 
        memset(addr, 0, npgs * pgsize);
 
-       printf(">>> MADV_FREE'ING FIRST ANYMOUS REGION AGAIN <<<\n");
+       printf("    CHECKING RESIDENCY\n");
+
+       if (check_residency(addr, npgs) != npgs) {
+               printf("    RESIDENCY CHECK FAILED!\n");
+               ecode = 1;
+       }
+
+       printf(">>> MADV_FREE'ING FIRST ANONYMOUS REGION AGAIN <<<\n");
 
        if (madvise(addr, npgs * pgsize, MADV_FREE) == -1)
                err(1, "madvise");
@@ -329,7 +339,15 @@
        if ((addr = shmat(shmid, NULL, 0)) == (void *) -1)
                err(1, "shmat");
 
+       printf("    CHECKING RESIDENCY\n");
+
+       if (check_residency(addr, npgs) != 0) {
+               printf("    RESIDENCY CHECK FAILED!\n");
+               ecode = 1;
+       }
+
        printf("    ZEROING SEGMENT\n");
+
        memset(addr, 0, npgs * pgsize);
 
        printf("    CHECKING RESIDENCY\n");



Home | Main Index | Thread Index | Old Index