bootclasspath.dir usage

Jonathan Gibbons jonathan.gibbons at
Tue Aug 20 13:15:40 PDT 2013


Start with a clean work directory and try to run the test.

Now look at *all* of JTwork/classes and see if you can see any .class 
files that seem to be in the wrong directory.   Make sure those classes 
are mentioned in explicit @build directives in the right place.

Failing that, do the following:

Identify two tests, I'll call them A and B, such that B is the test that 
sometimes fails, and A is a test that allows B to pass if you run it first.

1. Clean your work directory.
     Run test B (the test that will fail.)
     Run test A (in a separate jtreg run)
     Execute  'cd JTWork ; find . classes -type f > LIST-B-A.txt

2. Start over. Clean your work directory
     Run test A first this time
     Run test B (which should pas this time)
     Execute  'cd JTWork ; find . classes -type f > LIST-A-B.txt

Compare the two LIST-*.txt files and try and identify the reason for the 

-- Jon

On 08/20/2013 12:55 PM, Jonathan Gibbons wrote:
> Henry,
> It sounds like you have insufficient @build directives and that some 
> of your library classes are being implicitly compiled (into the wrong 
> place)
> -- Jon
> On 08/19/2013 10:03 PM, Henry Jen wrote:
>> Hi,
>> I try to move a test for Pattern.splitAsStream() into
>> test/java/util/regex because that is where is should be based on
>> convention. The test is now currently several layers under
>> test/java/util/stream as initially developed in part of lambda testng 
>> tests.
>> The move is not straightforward because it makes use of stream test
>> framework which has to be included in bootclasspath.
>> I added @library tag, and hopefully it picks up bootclasspath.dir
>> setting from located in
>> test/java/util/stream/bootlib/TEST/properties as that seems to be how
>> stream tests works.
>> This partially works. What I mean by that is, if I try to run regex test
>> from a clean state, the bootclasspath is not picked up and the test
>> failed as show in attached PatternTest.jtr.failed as you can see in the
>> rerun section(a nice feature, BTW).
>> However, if I run a stream test first and keep the JT* working folder,
>> the test passes. Attached is the patch file, and you can reproduce this
>> with following steps after apply attached JDK-8016846 for the test,
>> $ cd jdk
>> $ jtreg -v test/java/util/regex #failed
>> $ jtreg -v
>> test/java/util/stream/test/org/openjdk/tests/java/util/stream/ 
>> $ jtreg -v test/java/util/regex #succeeded
>> or combine above two steps into one also work,
>> $ jtreg -v
>> test/java/util/stream/test/org/openjdk/tests/java/util/stream/ 
>> test/java/util/regex #succeeded
>> Do I miss any option here or this is not really supported?
>> Cheers,
>> Henry

More information about the jtreg-use mailing list