RFR: 8338344: Test TestPrivilegedMode.java intermittent fails java.lang.NoClassDefFoundError: jdk/test/lib/Platform [v2]
Christian Hagedorn
chagedorn at openjdk.org
Wed Aug 14 12:17:03 UTC 2024
On Wed, 14 Aug 2024 11:53:27 GMT, SendaoYan <syan at openjdk.org> wrote:
>> test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestPrivilegedMode.java line 38:
>>
>>> 36: * @modules java.base/jdk.internal.vm.annotation
>>> 37: * @library /test/lib /
>>> 38: * @build jdk.test.lib.Platform
>>
>> Is that really required or is it enough to set `TEST_CLASS_PATH`?
>
> Yes, it's enough to set `TEST_CLASS_PATH`. But the jtreg [doc](https://openjdk.org/jtreg/tag-spec.html) suggest that `appropriate @build directives to ensure that the classes will be compiled`.
Okay, but then I suggest to remove `@build` when `TEST_CLASS_PATH` is enough because the IR framework is already special in that regard as it aims for simplicity: The IR test itself should not need to worry about the IR framework internal classes that need to be built. For example, we already silently build and install the `WhiteBox` class without the need to specify it with `@build` in the IR test.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20576#discussion_r1716814640
More information about the hotspot-compiler-dev
mailing list