Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Sep 2022 13:03:30 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e4eedf8c31a2 - main - posixshm tests: Map the large pages in the madvise test
Message-ID:  <202209261303.28QD3UP4059237@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209261303.28QD3UP4059237>