Source-Changes-HG archive

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

[src/trunk]: src/tests/sys/uvm Fixed issues with uvm_physseg_plug test case.



details:   https://anonhg.NetBSD.org/src/rev/85bc88cee78e
branches:  trunk
changeset: 838418:85bc88cee78e
user:      fox <fox%NetBSD.org@localhost>
date:      Wed Jan 16 13:35:51 2019 +0000

description:
Fixed issues with uvm_physseg_plug test case.

There is a condition check which failed for VM_PHYSSEG_MAX == 2 (not for
1 or 3 and above), in case of 2, pgs == slab + npages1 + npages3, so we
need to change ">" check to ">=" check.

Reviewed by <cherry>

diffstat:

 tests/sys/uvm/t_uvm_physseg.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 3c2685c3e6d1 -r 85bc88cee78e tests/sys/uvm/t_uvm_physseg.c
--- a/tests/sys/uvm/t_uvm_physseg.c     Wed Jan 16 13:21:02 2019 +0000
+++ b/tests/sys/uvm/t_uvm_physseg.c     Wed Jan 16 13:35:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_uvm_physseg.c,v 1.5 2019/01/16 13:21:02 fox Exp $ */
+/* $NetBSD: t_uvm_physseg.c,v 1.6 2019/01/16 13:35:51 fox Exp $ */
 
 /*-
  * Copyright (c) 2015, 2016 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_uvm_physseg.c,v 1.5 2019/01/16 13:21:02 fox Exp $");
+__RCSID("$NetBSD: t_uvm_physseg.c,v 1.6 2019/01/16 13:35:51 fox Exp $");
 
 /*
  * If this line is commented out tests related to uvm_physseg_get_pmseg()
@@ -522,7 +522,7 @@
        ATF_REQUIRE_EQ(uvm_physseg_plug(VALID_START_PFN_4, npages4, &upm4), true);
        /* The hot plug slab should have nothing to do with the original slab */
        pgs = uvm_physseg_get_pg(upm4, 0);
-       ATF_REQUIRE(pgs < slab || pgs > (slab + npages1
+       ATF_REQUIRE(pgs < slab || pgs >= (slab + npages1
 #if VM_PHYSSEG_MAX > 2
                + npages2
 #endif



Home | Main Index | Thread Index | Old Index