git: e4eedf8c31a2 - main - posixshm tests: Map the large pages in the madvise test
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 26 Sep 2022 13:03:30 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=e4eedf8c31a2693f07628d3b0433c6d398fdb6cd
commit e4eedf8c31a2693f07628d3b0433c6d398fdb6cd
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-09-26 12:58:10 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-09-26 12:58:10 +0000
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
---
tests/sys/posixshm/posixshm_test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c
index 8d1f0c56e077..c84eca319e0e 100644
--- a/tests/sys/posixshm/posixshm_test.c
+++ b/tests/sys/posixshm/posixshm_test.c
@@ -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);