Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 12 test compilation #4531

Merged
merged 4 commits into from
Feb 14, 2019
Merged

Conversation

theresa-m
Copy link
Contributor

@theresa-m theresa-m commented Jan 31, 2019

Depends on Java 12 compilation pr: #3980

Fixes: #4522

  1. In Java 12 internal libraries SharedSecrets and JavaLangAccess were moved from jdk.internal.misc to jdk.internal.access causing some tests in Java8AndUp to fail. To reuse as little code as possible I've moved all the tests that were in src_110 to a folder called src_110_up which will be used for versions 11+. I've wrapped the uses of SharedSecrets and JavaLangAccess into a class called InternalAccessor. There is one InternalAccessor for Java 11 in src_110 and one for Java 12 in src_120.

  2. I've also added a latest_exclude_12.xml and jvmtitests_excludes_12.xml which were causing FileNotFoundExceptions in the tests

  3. Fixed runtime build failures, need add-exports

fyi @llxia

public <E extends Enum<E>> E[] getEnumConstantsShared(Class<E> clazz) {
return this.access.getEnumConstantsShared(clazz);
}
}
Copy link
Contributor

@llxia llxia Feb 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file src_120/src_110/org/openj9/test/jdk/internal/InternalAccessor.java the same as file above src_110/org/openj9/test/jdk/internal/InternalAccessor.java?

If two files are needed, it is needed to put 110 under 120? src_120/src_110/?

Copy link
Contributor Author

@theresa-m theresa-m Feb 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference is in the imports.
Java 11:
import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.JavaLangAccess;

Java 12:
import jdk.internal.access.SharedSecrets; import jdk.internal.access.JavaLangAccess;

These libraries were moved around in Java 12

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and clearly the file structure is a bit off here.. src_120/src_110 I'll fix that for sure

@DanHeidinga
Copy link
Member

@llxia Does this change look OK now? I'd like to get to a jdk12 build up and running asap

@pshipton
Copy link
Member

jdk12 testing in https://ci.eclipse.org/openj9/view/Pipelines/job/Pipeline-Release-Build/40/ with this change and #3980 shows only known issues.

cmdLineTester_CryptoTest_0 - openssl not ported to jdk12 yet

#4658
TestFlushReflectionCache_0

#4661
openj9_jsr292Test_0
openj9_jsr292Test_JitCount0_0

Copy link
Contributor

@llxia llxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@llxia
Copy link
Contributor

llxia commented Feb 14, 2019

@theresa-m Could you rebase your branch so that #3980 is included? I would like to run PR builds for jdk11 and jdk12 if possible.

In Java 12 internal libraries SharedSecrets and JavaLangAccess were moved from jdk.internal.misc to jdk.internal.access causing some tests in Java8AndUp to fail.

To reuse as little code as possible I've moved all the tests that were in src_110 to a folder called src_110_up which will be used for versions 11+. I've wrapped the uses of SharedSecrets and JavaLangAccess into a class called InternalAccessor. There is one InternalAccessor for Java 11 in src_110 and one for Java 12 in src_120.

Signed-off-by: Theresa Mammarella <[email protected]>
Causing FileNotFound exception

Signed-off-by: Theresa Mammarella <[email protected]>
Signed-off-by: Theresa Mammarella <[email protected]>
Signed-off-by: Theresa Mammarella <[email protected]>
@theresa-m
Copy link
Contributor Author

sure. @llxia rebase is done

@llxia
Copy link
Contributor

llxia commented Feb 14, 2019

Jenkins test sanity xlinux jdk11

@llxia
Copy link
Contributor

llxia commented Feb 14, 2019

JDK12 PR build is not supported yet.
Given Peter already run jdk12 testing in https://ci.eclipse.org/openj9/view/Pipelines/job/Pipeline-Release-Build/40/ with this change, I will merge this PR once the above JDK11 PR build passes.

@llxia llxia merged commit 821d6f1 into eclipse-openj9:master Feb 14, 2019
@theresa-m theresa-m deleted the working_12_test branch February 25, 2019 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants