8067442: Tests using -Xshare:dump does not work with 'make test'
David Holmes
david.holmes at oracle.com
Tue Dec 16 09:59:16 UTC 2014
On 16/12/2014 7:50 PM, Erik Helin wrote:
> On 2014-12-16, David Holmes wrote:
>> On 16/12/2014 1:20 AM, Erik Helin wrote:
>>> Hi all,
>>>
>>> this patch changes the dependency for the target `test` in make/Main.gmk
>> >from exploded-image to jimages. This is needed because PRODUCT_HOME in
>>> `make test` needs to be set to a full JDK image directory, because there
>>> are tests in hotspot/test that uses -Xshare:dump and -Xshare:dump does
>>> not work with an exploded jdk image.
>>
>> Is that something that should be fixed? What you are doing now seems a
>> temporary workaround.
>
> I am not familiar with the class data sharing (CDS) implementation, but
> the failures all give the same error:
>
> Hint: enable -XX:+TraceClassPaths to diagnose the failure
> Error occurred during initialization of VM
> CDS allows only empty directories in archived classpaths
>
> I don't know why CDS does not allow non-empty directories on the
> archived classpath, maybe Ioi can answer that?
It is because the classpath has ot be known to be the same at dump time
and runtime. If we allowed directories in the classpath (versus jars)
then we would have to track the directory contents.
> Anyhow, I believe that eventually enhancing CDS to allow non-empty
> directories on the archived classpath is a separate patch. This patch is
> about reversing the change that Erik did (see his reply for more
> details) to make sure that we can run the tests.
>
> What do you think?
Yes that is fine. I think these tests would also have failed in the
non-modular image if run against the jdk directory rather than the image.
Thanks,
David
>
> Thanks,
> Erik
>
>> David
>>
>>> There are currently 9 tests that are failing due to this when running:
>>> $ make test TEST=hotspot_runtime
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~ehelin/8067442/webrev.00/
>>>
>>> Bug:
>>> https://bugs.openjdk.java.net/browse/JDK-8067442
>>>
>>> Testing:
>>> - Run `make test TEST=hotspot_runtime` on Linux x86-64 and verified
>>> that all tests now passes.
>>>
>>> Thanks,
>>> Erik
>>>
More information about the jdk9-dev
mailing list