RFR: 8298619: java/io/File/GetXSpace.java is failing
Brian Burkhalter
bpb at openjdk.org
Fri Feb 10 17:13:12 UTC 2023
On Fri, 10 Feb 2023 13:51:24 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> It seems a bit fragile to be parsing the output of `fsutil volume diskFree` as the output seems to vary by Windows releases and maybe configuration. So minimally, I think it should be changed to use ProcessTools so that the command and the output show up in the .jtr file.
>
> In passing, you might want to choose a different method name to make it clearer what it does, maybe volumeDiskFree?
Another possibility would be to add a native method to the test itself to invoke [GetDiskSpaceInformationW](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskspaceinformationw) to obtain the value of `CallerTotalAllocationUnits` (in bytes) from the [DISK_SPACE_INFORMATION](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/ns-fileapi-disk_space_information) structure.
-------------
PR: https://git.openjdk.org/jdk/pull/12397
More information about the core-libs-dev
mailing list