From nobody Tue May 03 14:04:44 2022 X-Original-To: dev-commits-src-all@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 4D6CA1ABA257; Tue, 3 May 2022 14:04:47 +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 4Kt1tP32WDz3RGS; Tue, 3 May 2022 14:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651586685; 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=0zdMqt+KBev+/7rNqxIePSKHC6SnzV88P1yr/MTUsAU=; b=VN+soN0gALU0rK4+AkOcjpjk/i4ewsI1jLC/YBEgdQxFak793mPycBkJQMbW02I+WdA8Bc 40VY0cF+cjsTA6SlTKoW4/Dx7R92gfhWFjBgpkaAH25yokUtbuG3arpk9SWgYg3xB+1Pho s4mEZtuTQ3sVssH2jxhkzyNINJwUJTHb9R2D4/ta/2raUIsSyWkeVOROKxvd+G+Vg3Ynn7 dYKEuBZYuBlzsPYsyB7dF0CSteV8N6TvlvVfGsd38X5ZjWOwX7t/cgGjoFV31JYbEidStI J+GCKE/wErPsv1I++4nfIB/SPskbB7Py75+68+Y/u4/Almxi0T24qDEushDnug== 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 E47291F8EA; Tue, 3 May 2022 14:04:44 +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 243E4ihu077929; Tue, 3 May 2022 14:04:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 243E4i2l077928; Tue, 3 May 2022 14:04:44 GMT (envelope-from git) Date: Tue, 3 May 2022 14:04:44 GMT Message-Id: <202205031404.243E4i2l077928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 3ed2c7a4bead - stable/13 - Have path_test ask the kernel for the page size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 3ed2c7a4bead6cb8240942decce32aadc0df8ca3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651586685; 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=0zdMqt+KBev+/7rNqxIePSKHC6SnzV88P1yr/MTUsAU=; b=AcEykamqfP92K+ovT8Srz5QJVI7JHnQQ4HJ3oS10nBJY4Fm/BRayHuJU982Rbl/4+DIgi4 cMRh/LWAgv5GD1dV2nxibYfWR8ioqmJW23myzkrm80Y77ikVcD6R6KjebsKMhdCw5AI0Of dfnyhZlyubJFTIbbHCMzyI0v1UnquIi6jUKOTo69+w2nFLs7HObmXJlwm1808innlhOASy W2j/qOzkbTWPQSOUPv6wwRkjIEpKfSKEeZA7ccoOqqtFiaEXRTo84Cp1dGfKOnE9JdyGAi 3/A5uThAJvxmnHPjVb7kojI6qkFkjGS2s08+P7aYLtXxR8tyk8ZmVPBdNx77vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651586685; a=rsa-sha256; cv=none; b=eVbf9wv3OyhwfTWYYX4mxA43KnEf1nprRSxEbTcUy9Fd7ulaz4BYQ9MqE+DsHgojvKNJPz H5ckd1oXGs3qz1iYbjSLPbdJlrG+54LZppz00L+K0q46kbUC3OiVlYIb3YzChshSncDMkq U7TtmJZn4vik7uQSf88UuQRsBPfbYyvzNleTJQl84GkYA9jps6BLCL7/cnlHz+8S+idV5g oaCRPh68NbLgnHUbblgw/w6g+uUac9WSV55/wplCbLlcY053MipcbcyRC52zlRbmJ8VPb+ Ax3rc/IkHTIzZDHL83XV4Fkpg6FSQq879RuO8j+0Gs5NX6HgCwRk3vD6whN2Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=3ed2c7a4bead6cb8240942decce32aadc0df8ca3 commit 3ed2c7a4bead6cb8240942decce32aadc0df8ca3 Author: Andrew Turner AuthorDate: 2022-04-07 14:59:38 +0000 Commit: Andrew Turner CommitDate: 2022-05-03 14:04:04 +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 (cherry picked from commit 8d40ee599d130a7dcf57eba448d3966a7ce30638) --- 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 216782a5f2bc..a212325c7db6 100644 --- a/tests/sys/file/path_test.c +++ b/tests/sys/file/path_test.c @@ -607,6 +607,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. */ @@ -670,14 +671,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(). */