RFR: JDK-8221596: test/hotspot/jtreg/runtime/containers/docker/TestCPUSets.java failed with FileAlreadyExistsException

Mikhailo Seledtsov mikhailo.seledtsov at oracle.com
Thu Mar 28 21:50:55 UTC 2019

Hi Jie, David,

I did a bit of digging:

    - @run driver ClassFileInstaller -jar whitebox.jar 
sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
      is used in TestCPUSets.java, TestMemoryAwareness.java and 
      This instruction will generate whitebox.jar and place it in 
"current working jtreg directory", which is

    - in order to be able to use the WhiteBox.jar from within the Docker 
container, it is copied
      to the "JTReg test classes" directory (defined by 
      This Utils.TEST_CLASSES directory is mounted via --volume at 
docker-run-time, so that classes can be
      visible/usable/loadable from within the container.

    -  This Utils.TEST_CLASSES directory is unique for each test run:
       Hence, I do not see a possibility of file access clash among the 
different tests.

    - if tests are run concurrently (with -conc:X feature), each test 
gets their own scratch directory
      classes directories are also separated, as in non-concurrent case
      No file access clashes among tests either

    Is it possible that you did not clean out the directory from the 
previous run? For test execution, we recommend
    clearning JT* directories from the prior run before a new run (rm 
-Rf JT* or similar). This recommendation is not
    specific to Docker testing, it is a good practice in general for 
executing of jtreg tests.

Thank you,

On 3/28/19, 4:16 AM, David Holmes wrote:
> Hi Jie,
> On 28/03/2019 5:48 pm, Jie Fu wrote:
>> Hi David,
>> Thanks for your review.
>>> Normally to use WhiteBox a test specifies:
>>>  @run driver ClassFileInstaller sun.hotspot.WhiteBox
>> Yes, we do have it in 
>> test/hotspot/jtreg/runtime/containers/docker/TestCPUSets.java
> Okay I'm not understanding why Common is copying the WhiteBox classes 
> or where it is copying them to? If this is something to do with the 
> image shouldn't it be completely clean when the test is run - either 
> by deleting existing files or by ensuring a unique location to begin 
> with?
> Thanks,
> David
>> Best regard,
>> Jie
>>> Is there a reason this test can't use that?
>>> Thanks,
>>> David
>>> -----

More information about the hotspot-runtime-dev mailing list