On Tue, 9 Jun 2026 13:48:36 GMT, Alan Bateman <[email protected]> wrote:

>> This test does not care about compilation result (if the source compiles 
>> without errors or not). It is intended to test whether compilation does not 
>> leave any files opened after it finishes (so the lsof is used).
>
> Okay but the concern with using lsof (or 
> UnixOperatingSystemMXBean.getOpenFileDescriptorCount before/after) is that 
> the file descriptor usage increase as a side effect of something else. I 
> think it would require confident that it is stable in all the higher tiers, 
> only because it's hard to get tests like this stable.

I understand your concern, but note that only file descriptors associated with 
files in the target image previously created by jlink are counted. 
Unfortunately, I do not know of any other easy way to test this behavior.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31417#discussion_r3381487549

Reply via email to