RFR: 8298619: java/io/File/GetXSpace.java is failing [v2]
Brian Burkhalter
bpb at openjdk.org
Wed Feb 22 18:31:55 UTC 2023
On Tue, 14 Feb 2023 16:31:48 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>>> 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.
>>
>> That would be more reliable than parsing the output of `fsutil volume` so worth trying. You might have to dig into which of these win32 works with quotas as that seems to be part of the issue. The JDK uses GetDiskFreeSpaceExW. Also this test might have to do a few iterations so that it captures free space info while the system is in quiescence - I suspect some of the reliability issues has been concurrent activity that changes the volume space usage significantly while this test is running.
>
> There has definitely been a problem with quotas on Windows. I set up quotas on actual Windows 11 hardware and replicated the same failure. I am not sure how much lack of system quiescence is to blame, but there would be no harm in building in some robustness for lack of quiescence while we're at it.
Spawning `df` and `diskFree` processes have been replaced with native calls. For a reason as yet undetermined, the Windows function `GetDiskSpaceInformationW` fails to load on Windows Server 2016 so it is loaded dynamically and, if not found, a workaround is used.
-------------
PR: https://git.openjdk.org/jdk/pull/12397
More information about the core-libs-dev
mailing list