jtreg cannot be run against a pre-built/downloaded JDK anymore?

David Holmes david.holmes at oracle.com
Sat Nov 13 06:37:53 UTC 2021

On 13/11/2021 3:37 pm, Jaikiran Pai wrote:
> I got past this with an extensive workaround for now. I moved/copied 
> that test case java file outside of the JDK source tree, then created a 
> new/custom TEST.ROOT which is very minimal and has no reference to 
> whitebox for bootlibs, then made sure the jtwork directory is also 
> outside of the JDK source tree (so that the test is compiled afresh) and 
> then ran that test. That helped, but it's only for this test since its 
> requirements in the test are very minimal. I don't see a way to get past 
> this if I have to run the wider range of jtreg tests that reside in the 
> JDK source tree against a pre-built/downloaded Java 17 or any previous 
> versions.

Basically you're not supposed to do that. You have to test a given 
binary with the tests that existed when that binary was built. Many 
things in the tests can change that will fail to run with an older JDK.

In theory you can use the build number of the binary JDK to checkout the 
tests corresponding to that build using the appropriate build tag.


> -Jaikiran
> On 13/11/21 10:26 am, Jaikiran Pai wrote:
>> Hello Leonid,
>> On 13/11/21 9:38 am, Leonid Mesnik wrote:
>>> Hi
>>> It is a hotpost testing problem rather than a jtreg problem. So I’ve 
>>> added 
>>> hotspot-dev at openjdk.java.net<mailto:hotspot-dev at openjdk.java.net> alias.
>> Thank you for adding the right list.
>>> ...
>>> Could you please check that you use exactly the same sources during 
>>> testing which have been used to build JDK.
>> Do you mean the sources of the JDK against which the test is being 
>> run? I don't have those sources since this test runs against a 
>> pre-built binary downloaded from https://jdk.java.net/17/
>> -Jaikiran

More information about the jtreg-use mailing list