git: b66ab4c8b728 - stable/13 - tests: Handle platforms with MAXPAGESIZES < 2
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Aug 2022 23:59:46 UTC
The branch stable/13 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=b66ab4c8b728fd38abdb739838bfdd3877281908
commit b66ab4c8b728fd38abdb739838bfdd3877281908
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-08-23 23:48:06 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-08-23 23:59:34 +0000
tests: Handle platforms with MAXPAGESIZES < 2
Reported by: Jenkins
Fixes: 1dfa8b73f6a6 ("tests: Add more shared shadow regression tests")
(cherry picked from commit 4b8feb5d61ace6d94cafb03288a53694e84c2e53)
---
tests/sys/vm/shared_shadow_inval_test.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/sys/vm/shared_shadow_inval_test.c b/tests/sys/vm/shared_shadow_inval_test.c
index 8cd986b8ed99..c3a62296ffa4 100644
--- a/tests/sys/vm/shared_shadow_inval_test.c
+++ b/tests/sys/vm/shared_shadow_inval_test.c
@@ -365,7 +365,8 @@ do_shared_shadow_inval(bool lazy_cow)
ATF_REQUIRE(sysctllen >= sizeof(size_t));
pagesize = pagesizes[0];
- largepagesize = sysctllen >= 2 * sizeof(size_t) && pagesizes[1] != 0 ?
+ largepagesize = MAXPAGESIZES >= 2 &&
+ sysctllen >= 2 * sizeof(size_t) && pagesizes[1] != 0 ?
pagesizes[1] : 2 * 1024 * 1024;
for (unsigned int i = 0; i <= FLAG_MASK; i++) {