Fill the page size array in one posix shm test

The largepage_config posix shared memory test was failing on arm64 as
the page size array is never filled out. Fix this by calling
getpagesizes(3), via pagesizes.

Reviewed by:	markj, kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34960
This commit is contained in:
Andrew Turner 2022-04-19 17:22:37 +01:00
parent a879e40ca2
commit 05d173587b

View File

@ -1253,6 +1253,8 @@ ATF_TC_BODY(largepage_config, tc)
size_t ps[MAXPAGESIZES + 1]; /* silence warnings if MAXPAGESIZES == 1 */
int error, fd;
(void)pagesizes(ps);
fd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0);
ATF_REQUIRE_MSG(fd >= 0, "shm_open failed; error=%d", errno);