RFR: 8314186: runtime/8176717/TestInheritFD.java failed with "Log file was leaked"

Leo Korinth lkorinth at openjdk.org
Tue Jan 9 18:49:22 UTC 2024


On Tue, 9 Jan 2024 18:26:52 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:

>> Hi,
>> 
>> This PR intends to make the test a bit more sturdy by looking for both the success string and the failure string, reporting that the test messed up if neither are found. I also removed the extra newline at the end of the file and did some special reporting in case of a `TimeoutException`.
>> 
>> Thanks!
>
> test/hotspot/jtreg/runtime/8176717/TestInheritFD.java line 314:
> 
>> 312:                     System.out.println("(Third VM) Exception was thrown: " + e.toString());
>> 313:                 }
>> 314:                 throw e;
> 
> I do not know if this gives us any extra information from the single `println`. `e.toString()` ought to print the exception type, correct? If you really think it is worth having two different print statements, I think it would be better having one catch statement for each exception (both re-throwing), I guess the compiler would then complain if one exception source was removed. Either way, the casting to the TimeoutException is not necessary.

I need to look at it a bit more, I think this is not correct.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17325#discussion_r1446474946


More information about the hotspot-runtime-dev mailing list