posixshm tests: Map the large pages in the madvise test

This improves test coverage and was unintentionally omitted when the
tests were written.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2022-09-26 08:58:10 -04:00
parent 0fd27bcab2
commit e4eedf8c31

View File

@ -1476,6 +1476,8 @@ ATF_TC_BODY(largepage_madvise, tc)
ATF_REQUIRE_MSG(addr != MAP_FAILED,
"mmap(%zu bytes) failed; error=%d", ps[i], errno);
memset(addr, 0, ps[i]);
/* Advice that requires clipping. */
largepage_madvise(addr, ps[0], MADV_NORMAL, EINVAL);
largepage_madvise(addr, ps[i], MADV_NORMAL, 0);