Correct "library" usage and concurrent use of scratch directory

David Holmes david.holmes at
Mon Jun 29 12:40:05 UTC 2015


We have a test that sometimes fails with a ClassNotFoundException: 
test.Empty. Here's the file structure:


And here's the test directives from the failing

  * @test
  * @library /runtime/testlibrary
  * @library classes
  * @build test.Empty ClassUnloadCommon
  * @run main/othervm/timeout=200 FragmentMetaspaceSimple

Does this look right?

I've only reproduced the failure when running both tests in the 
Metaspace directory. And locally when that happens TraceExceptions shows 
me that the Classloader can't find the JTwork/scratch/./classes directory.

The other test is specified as:

  * @test
  * @library /runtime/testlibrary
  * @modules java.compiler
  * @build GeneratedClassLoader
  * @run main/othervm/timeout=200 -Xmx300m FragmentMetaspace

will they both try to manipulate the scratch directory?


More information about the jtreg-use mailing list