Fix shared_shadow_inval_test when superpages are disabled

In that case, there is only one page size.

Reviewed by:	kib
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D36265
This commit is contained in:
Eric van Gyzen 2022-08-19 15:05:19 -05:00
parent 62ce18fc9a
commit 3d268c19ef

View File

@ -365,7 +365,7 @@ do_shared_shadow_inval(bool lazy_cow)
ATF_REQUIRE(sysctllen >= sizeof(size_t));
pagesize = pagesizes[0];
largepagesize = sysctllen >= 2 * sizeof(size_t) ?
largepagesize = sysctllen >= 2 * sizeof(size_t) && pagesizes[1] != 0 ?
pagesizes[1] : 2 * 1024 * 1024;
for (unsigned int i = 0; i <= FLAG_MASK; i++) {