From nobody Thu Apr 07 14:59:55 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6C9321A88161; Thu, 7 Apr 2022 14:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KZ4L32Ngvz3D0p; Thu, 7 Apr 2022 14:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649343595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bpoi+nVmvAFI+DF3PeMuBVWPFuzeXfey1Wy/QVid4DU=; b=TNUpFxcDWHFQCdURrsFzWKEkQzIz8VFEU8sUd6/Zkrm4kAeUlG1Ql8J9sXhTzMLoBo1Okv 1cWkXzN8lWW6IrKsEKsA04h8ABwNPFXJ+gAtxYf/R7WKLJSjNYj8CFbdQ784nx63a3wh+P B7xKJ5lIhmEdz/hck5RAb1/Hq/zLyeo2i30Cb/HNujcPjpD3h/SBkR/lSy5CoDir8MwXKS za2VO+GvfnCAp0uXhzer6p2XzoGuNMirOzW6KOyvcKSPqNGmn9GiT4ESC4GWbSAm5uSYLJ BC5hbRM170kFooA9s5aab+TeU0pV3/AhGpq0yMUB9tabrW5c9gAtR4+53F1H8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27DB312682; Thu, 7 Apr 2022 14:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 237ExtSj040092; Thu, 7 Apr 2022 14:59:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 237ExtJR040091; Thu, 7 Apr 2022 14:59:55 GMT (envelope-from git) Date: Thu, 7 Apr 2022 14:59:55 GMT Message-Id: <202204071459.237ExtJR040091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 8d40ee599d13 - main - Have path_test ask the kernel for the page size List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d40ee599d130a7dcf57eba448d3966a7ce30638 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649343595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bpoi+nVmvAFI+DF3PeMuBVWPFuzeXfey1Wy/QVid4DU=; b=iEjC3PWie0o6epS5H1bVgmcUioEWMTPUY6RKLeXAbaAWE68TuQdVMNc8jNVeOr+k3rifLW xOARgd/Z0KmRB5hqhi0NFMwLRdlQItxTmacyZN3UFmi7bvFaihUmNmu0HF+LmIQ+2Rw1XR kbNleZHD53DUt8Nc3O7v45wDc+ur6vx3qwKIPzo97VD0Udm0X3uuHIGBtozULI2SAtBCmw OaXroKqnMdpOgzm12z+QKYqbWQikV6Daa0j7F19hf9O2dAGhqDvrH8XrXZampMNs/HLjmk E3ZmattopA674ib3h0AD9moHahy5TFw0R6Uw7uTv2k0bKe8GDajTmyt9dCxKIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649343595; a=rsa-sha256; cv=none; b=iWbLHQw7uzMt4nTeuH1gxGSVgnrzmjhPWnEeVzYE6OXvQTNnL7OnNUTS9NzQk2KqYWouls py2NGgbBYuq5QcEuaImiXgn5VXpxLnQ7IvUMUHtqMnjkuZNlHDZlkqkOYpbAGq8Fk+7EfN 5M+Dr1+EvXKR0b4M7FVaucpIIxL85I5IKysIIYD10CI6ZAdzJm92yetOp+TKMBgSPila1w H11Vf4+eNh0n3BxXIo4Z+mOiQVLeMS2HtrkJZKgz14HeeoIAmTKoc4ccSMswnlml7iAUnx 52JGpaFJt/mobQrWSWLdwRgfJPN0N9SRGor1eZXOkGd9NGT3FAQEoJzlXEpXLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8d40ee599d130a7dcf57eba448d3966a7ce30638 commit 8d40ee599d130a7dcf57eba448d3966a7ce30638 Author: Andrew Turner AuthorDate: 2022-04-07 14:59:38 +0000 Commit: Andrew Turner CommitDate: 2022-04-07 14:59:38 +0000 Have path_test ask the kernel for the page size It may be dynamic so we can't rely on PAGE_SIZE being present or correct. Sponsored by: The FreeBSD Foundation --- tests/sys/file/path_test.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/sys/file/path_test.c b/tests/sys/file/path_test.c index a39862cc78d6..39c653a07c1b 100644 --- a/tests/sys/file/path_test.c +++ b/tests/sys/file/path_test.c @@ -604,6 +604,7 @@ ATF_TC_BODY(path_io, tc) char path[PATH_MAX], path2[PATH_MAX]; char buf[BUFSIZ]; struct iovec iov; + size_t page_size; int error, fd, pathfd, sd[2]; /* It shouldn't be possible to create new files with O_PATH. */ @@ -667,14 +668,15 @@ ATF_TC_BODY(path_io, tc) ATF_REQUIRE_MSG(error == ESPIPE, "posix_fadvise() returned %d", error); /* mmap() is not allowed. */ + page_size = getpagesize(); ATF_REQUIRE_ERRNO(ENODEV, - mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, pathfd, 0) == + mmap(NULL, page_size, PROT_READ, MAP_SHARED, pathfd, 0) == MAP_FAILED); ATF_REQUIRE_ERRNO(ENODEV, - mmap(NULL, PAGE_SIZE, PROT_NONE, MAP_SHARED, pathfd, 0) == + mmap(NULL, page_size, PROT_NONE, MAP_SHARED, pathfd, 0) == MAP_FAILED); ATF_REQUIRE_ERRNO(ENODEV, - mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, pathfd, 0) == + mmap(NULL, page_size, PROT_READ, MAP_PRIVATE, pathfd, 0) == MAP_FAILED); /* No fsync() or fdatasync(). */