jtreg cannot be run against a pre-built/downloaded JDK anymore?
Leonid Mesnik
leonid.mesnik at oracle.com
Sat Nov 13 04:08:34 UTC 2021
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.
Seems that problem is that WhiteBox API used in testing doesn’t correspond to JDK being tested.
This commit changed WhiteBox.canWriteJavaHeapArchive() method
https://github.com/openjdk/jdk/commit/922e86f4ff28c7b17af8e7b5867a40fc76b7fdd7#diff-e75d116b35afd951f114c2b0793b26d0009b441653d6b28d611afcbe0106dfd0
So you might see this linkage error if tries to test older version of JDK while tests have these changes.
Could you please check that you use exactly the same sources during testing which have been used to build JDK.
Leonid
From: jtreg-use <jtreg-use-retn at openjdk.java.net> on behalf of Jaikiran Pai <jai.forums2013 at gmail.com>
Date: Friday, November 12, 2021 at 8:40 PM
To: jtreg-use at openjdk.java.net <jtreg-use at openjdk.java.net>
Subject: jtreg cannot be run against a pre-built/downloaded JDK anymore?
In order to reproduce one of the issues I have been looking into, I've
been trying to run a jtreg test case against a Java 17 installation. The
command I use is:
java -jar jtreg.jar -jdk:<path-to-jdk-17-home>
test/jdk/java/..../SomeTest.java
This runs into the following exception:
failed to get value for vm.cds.write.archived.java.heap
java.lang.UnsatisfiedLinkError: 'boolean
jdk.test.whitebox.WhiteBox.canWriteJavaHeapArchive()'
at jdk.test.whitebox.WhiteBox.canWriteJavaHeapArchive(Native Method)
at requires.VMProps.vmCDSCanWriteArchivedJavaHeap(VMProps.java:413)
at requires.VMProps$SafeMap.put(VMProps.java:72)
at requires.VMProps.call(VMProps.java:113)
at requires.VMProps.call(VMProps.java:60)
at
com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:80)
at
com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)
Test results: failed: 1
Is this something I am doing wrong or is it some genuine issue? I
haven't been able to run jtreg against a downloaded/installed JDK for
many weeks now. Initially I thought I had somehow messed my local jdk
source repo setup so didn't pay much attention to the failures. But now,
I'm trying this on a completely different clean setup and that too runs
into this issue.
Here's the output of jtreg -version:
jtreg 6.1-dev+1
Installed in <some-location>\jtreg\lib\jtreg.jar
Running on platform version 17.0.1 from <some-location>\jdk-17.0.1.
Built with Java(TM) 2 SDK, Version 1.8.0_312-b07 on November 12, 2021.
Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
Use is subject to license terms.
JT Harness, version 6.0 ea b14 (November 12, 2021)
JCov 3.0-2
Java Assembler Tools, version 7.0 ea b09 (November 12, 2021)
TestNG (testng.jar): version 7.3.0
TestNG (jcommander.jar): version unknown
TestNG (guice.jar): version 4.2.3
JUnit (junit.jar): version 4.13.2
JUnit (hamcrest.jar): version 2.2
-Jaikiran
More information about the hotspot-dev
mailing list