Module Name: src
Committed By: fox
Date: Wed Jan 16 13:35:51 UTC 2019
Modified Files:
src/tests/sys/uvm: t_uvm_physseg.c
Log Message:
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>
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/sys/uvm/t_uvm_physseg.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/sys/uvm/t_uvm_physseg.c
diff -u src/tests/sys/uvm/t_uvm_physseg.c:1.5 src/tests/sys/uvm/t_uvm_physseg.c:1.6
--- src/tests/sys/uvm/t_uvm_physseg.c:1.5 Wed Jan 16 13:21:02 2019
+++ src/tests/sys/uvm/t_uvm_physseg.c Wed Jan 16 13:35:51 2019
@@ -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_TC_BODY(uvm_physseg_plug, tc)
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