RFR: 8299970: Speed up compiler/arraycopy/TestArrayCopyConjoint.java

Vladimir Kozlov kvn at openjdk.org
Wed Feb 8 19:58:50 UTC 2023


On Wed, 8 Feb 2023 19:45:34 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyConjoint.java line 268:
>> 
>>> 266:         System.out.println("PASS : " + validate_ctr);
>>> 267:       } catch (Exception e) {
>>> 268:         System.out.println(e.getMessage());
>> 
>> `try/catch` is there because `arraycopy` may throw exception due to some mess up in code generation and we want call stack and information about that to debug the issue.
>
> But with that try/catch, no exception will be thrown and therefore the test would pass, right? And the exception would contain a stack trace, no need to catch it and print its contents.

You are right. In this case, please also update `TestArrayCopyDisjoint.java` test.
It could be "copy/paste" issue when these tests were created based on other existing tests.
May be in separate RFE we should review tests which use `catch` and may hide a failure.

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

PR: https://git.openjdk.org/jdk/pull/12475


More information about the hotspot-compiler-dev mailing list