RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160"
On Windows, suppress failure if the total space indicated by `df` is less than `FileStore::getTotalSpace` and the free space indicated by `df` equals `FileStore::getUnallocatedSpace`. - Commit messages: - 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" Changes: https://git.openjdk.org/jdk/pull/9856/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9856&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8291911 Stats: 8 lines in 2 files changed: 5 ins; 1 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/9856.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9856/head:pull/9856 PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160"
On Fri, 12 Aug 2022 14:52:23 GMT, Brian Burkhalter wrote: > On Windows, suppress failure if the total space indicated by `df` is less > than `FileStore::getTotalSpace` and the free space indicated by `df` equals > `FileStore::getUnallocatedSpace`. Passed on 20 arbitrary nodes and on one where it failed previously due to user disk quotas. - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160"
On Fri, 12 Aug 2022 14:52:23 GMT, Brian Burkhalter wrote: > On Windows, suppress failure if the total space indicated by `df` is less > than `FileStore::getTotalSpace` and the free space indicated by `df` equals > `FileStore::getUnallocatedSpace`. test/jdk/java/io/File/GetXSpace.java line 244: > 242: // reported by df might be less that the actual total > space in > 243: // the store, but the free space should be the same. > 244: if (!(Platform.isWindows() && ts > s.total && fs == > s.free())) { Unsure of the conditional here, in particular whether `fs == s.free()` is needed. Also, when failure is suppressed here, an informational print might be useful. - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160"
On Fri, 12 Aug 2022 14:52:23 GMT, Brian Burkhalter wrote: > On Windows, suppress failure if the total space indicated by `df` is less > than `FileStore::getTotalSpace` and the free space indicated by `df` equals > `FileStore::getUnallocatedSpace`. This is hard to review. Would it be possible to provide a summary on the APIs and df behave with quotas? - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160"
On Mon, 15 Aug 2022 16:39:42 GMT, Alan Bateman wrote: > This is hard to review. Would it be possible to provide a summary on the APIs > and df behave with quotas? We use the Windows API [GetDiskFreeSpaceEx](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskfreespaceexw) wherein it is stated - lpFreeBytesAvailableToCaller: If per-user quotas are being used, this value may be less than the total number of free bytes on a disk. - lpTotalNumberOfBytes: If per-user quotas are being used, this value may be less than the total number of bytes on a disk. The `df` command on the other hand appears to be using something like [GetQuotaInformation](https://docs.microsoft.com/en-us/windows/win32/api/dskquota/nf-dskquota-idiskquotauser-getquotainformation) which fills a [structure](https://docs.microsoft.com/en-us/windows/win32/api/dskquota/ns-dskquota-diskquota_user_information) which accounts for the quota and provides the currently used and maximum allowed number of bytes for a user. - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160"
On Fri, 12 Aug 2022 14:52:23 GMT, Brian Burkhalter wrote: > On Windows, suppress failure if the total space indicated by `df` is less > than `FileStore::getTotalSpace` and the free space indicated by `df` equals > `FileStore::getUnallocatedSpace`. In reality GetFreeDiskSpaceEx does not appear to recognize the quotas, at least in our tests. - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v2]
On Fri, 12 Aug 2022 15:13:06 GMT, Brian Burkhalter wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8291911: Account for quotas on Windows. > > test/jdk/java/io/File/GetXSpace.java line 244: > >> 242: // reported by df might be less that the actual total >> space in >> 243: // the store, but the free space should be the same. >> 244: if (!(Platform.isWindows() && ts > s.total && fs == >> s.free())) { > > Unsure of the conditional here, in particular whether `fs == s.free()` is > needed. Also, when failure is suppressed here, an informational print might > be useful. Changed the conditional in 991dc9a6bf86e3ec54fd1c244c655a86506a697d. - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v2]
> On Windows, suppress failure if the total space indicated by `df` is less > than `FileStore::getTotalSpace` and the free space indicated by `df` equals > `FileStore::getUnallocatedSpace`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8291911: Account for quotas on Windows. - Changes: - all: https://git.openjdk.org/jdk/pull/9856/files - new: https://git.openjdk.org/jdk/pull/9856/files/af2d6f50..991dc9a6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9856&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9856&range=00-01 Stats: 34 lines in 1 file changed: 13 ins; 1 del; 20 mod Patch: https://git.openjdk.org/jdk/pull/9856.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9856/head:pull/9856 PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v2]
On Wed, 17 Aug 2022 17:59:34 GMT, Brian Burkhalter wrote: >> On Windows, suppress failure if the total space indicated by `df` is less >> than `FileStore::getTotalSpace` and the free space indicated by `df` equals >> `FileStore::getUnallocatedSpace`. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8291911: Account for quotas on Windows. The version of the test in commit 991dc9a6bf86e3ec54fd1c244c655a86506a697d passed 5 repeats on Linux and macOS and 51 repeats on Windows, including on a node on which it previously failed. - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v2]
On Wed, 17 Aug 2022 17:59:34 GMT, Brian Burkhalter wrote: >> On Windows, suppress failure if the total space indicated by `df` is less >> than `FileStore::getTotalSpace` and the free space indicated by `df` equals >> `FileStore::getUnallocatedSpace`. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8291911: Account for quotas on Windows. continue; - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v3]
> On Windows, suppress failure if the total space indicated by `df` is less > than `FileStore::getTotalSpace` and the free space indicated by `df` equals > `FileStore::getUnallocatedSpace`. Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision: - 8291911: Minor formatting cleanup in test - Merge - 8291911: work in progress - 8291911: Account for quotas on Windows. - 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" - Changes: - all: https://git.openjdk.org/jdk/pull/9856/files - new: https://git.openjdk.org/jdk/pull/9856/files/991dc9a6..81296309 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9856&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9856&range=01-02 Stats: 183635 lines in 2941 files changed: 90047 ins; 74842 del; 18746 mod Patch: https://git.openjdk.org/jdk/pull/9856.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9856/head:pull/9856 PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v3]
On Tue, 11 Oct 2022 20:50:15 GMT, Brian Burkhalter wrote: >> On Windows, suppress failure if the total space indicated by `df` is less >> than `FileStore::getTotalSpace` and the free space indicated by `df` equals >> `FileStore::getUnallocatedSpace`. > > Brian Burkhalter has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains five additional > commits since the last revision: > > - 8291911: Minor formatting cleanup in test > - Merge > - 8291911: work in progress > - 8291911: Account for quotas on Windows. > - 8291911: java/io/File/GetXSpace.java fails with "53687091200 != > 161051996160" Commit 8129630943ae98e79bceff18c20a5cb71d30ffd9 passed 50 repeats on the Unix platforms and 150 on Windows. - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v3]
On Tue, 11 Oct 2022 20:50:15 GMT, Brian Burkhalter wrote: >> On Windows, suppress failure if the total space indicated by `df` is less >> than `FileStore::getTotalSpace` and the free space indicated by `df` equals >> `FileStore::getUnallocatedSpace`. > > Brian Burkhalter has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains five additional > commits since the last revision: > > - 8291911: Minor formatting cleanup in test > - Merge > - 8291911: work in progress > - 8291911: Account for quotas on Windows. > - 8291911: java/io/File/GetXSpace.java fails with "53687091200 != > 161051996160" Ping. - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v3]
On Tue, 11 Oct 2022 20:50:15 GMT, Brian Burkhalter wrote: >> On Windows, suppress failure if the total space indicated by `df` is less >> than `FileStore::getTotalSpace` and the free space indicated by `df` equals >> `FileStore::getUnallocatedSpace`. > > Brian Burkhalter has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains five additional > commits since the last revision: > > - 8291911: Minor formatting cleanup in test > - Merge > - 8291911: work in progress > - 8291911: Account for quotas on Windows. > - 8291911: java/io/File/GetXSpace.java fails with "53687091200 != > 161051996160" Looks fine. test/jdk/java/io/File/GetXSpace.java line 140: > 138: StringBuilder sb = new StringBuilder(); > 139: Process p = Runtime.getRuntime().exec(cmd); > 140: try (BufferedReader in = new BufferedReader(new > InputStreamReader(p.getInputStream( { The RHS could be replaced by `p.inputReader()`. (new in JDK 17) - Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v3]
On Wed, 9 Nov 2022 21:09:30 GMT, Roger Riggs wrote: >> Brian Burkhalter has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains five additional >> commits since the last revision: >> >> - 8291911: Minor formatting cleanup in test >> - Merge >> - 8291911: work in progress >> - 8291911: Account for quotas on Windows. >> - 8291911: java/io/File/GetXSpace.java fails with "53687091200 != >> 161051996160" > > test/jdk/java/io/File/GetXSpace.java line 140: > >> 138: StringBuilder sb = new StringBuilder(); >> 139: Process p = Runtime.getRuntime().exec(cmd); >> 140: try (BufferedReader in = new BufferedReader(new >> InputStreamReader(p.getInputStream( { > > The RHS could be replaced by `p.inputReader()`. (new in JDK 17) So changed in 02556f265e1fc5274e73e8cfa75ce218c130112e. @RogerRiggs Thanks for the review. - PR: https://git.openjdk.org/jdk/pull/9856
Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v4]
> On Windows, suppress failure if the total space indicated by `df` is less > than `FileStore::getTotalSpace` and the free space indicated by `df` equals > `FileStore::getUnallocatedSpace`. Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision: - 8291911: Use Process::inputReader - Merge - 8291911: Minor formatting cleanup in test - Merge - 8291911: work in progress - 8291911: Account for quotas on Windows. - 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" - Changes: - all: https://git.openjdk.org/jdk/pull/9856/files - new: https://git.openjdk.org/jdk/pull/9856/files/81296309..02556f26 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=9856&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9856&range=02-03 Stats: 224292 lines in 2665 files changed: 115506 ins; 70879 del; 37907 mod Patch: https://git.openjdk.org/jdk/pull/9856.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9856/head:pull/9856 PR: https://git.openjdk.org/jdk/pull/9856