openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

Enable downcall & upcall test suites for Java 17/18/19

Open ChengJin01 opened this issue 2 years ago • 10 comments

The changes include all test suites intended for downcall and upcall in Java17, 18 and 19 which can be enabled on the following platforms: 1)downcall: all supported platforms 2)upcall: AIX/PPC and Linux/PPC64LE

Signed-off-by: Cheng Jin [email protected]

ChengJin01 avatar Jun 13 '22 18:06 ChengJin01

The change also belongs to the issue intended for the upcall work at https://github.com/eclipse-openj9/openj9/issues/15068.

Note:

  1. the test suites cover the downcall & upcall tests in Java 19 and upcall specific tests in Java 17 & 18.
  2. the PR depends on all code included in https://github.com/eclipse-openj9/openj9/issues/15068. So the code there must be merged at first before the test suites.

Reviewer: @tajila, @llxia (for the test framework) FYI: @DanHeidinga, @pshipton, @gacholio

ChengJin01 avatar Jun 13 '22 18:06 ChengJin01

@llxia Please review these changes

tajila avatar Jun 14 '22 13:06 tajila

jenkins test sanity amac jdk17

tajila avatar Jun 17 '22 17:06 tajila

jenkins test sanity plinux jdk19

tajila avatar Jun 17 '22 17:06 tajila

The test failures on MacOS/Aarch64 at https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_sanity.functional_aarch64_mac_Personal/60/tapResults/ e.g.

FAILED: test_vprintfFromDefaultLibWithVaList
java.util.NoSuchElementException: No value present
	at java.base/java.util.Optional.get(Optional.java:143)
	at org.openj9.test.jep389.valist.VaListTests.test_vprintfFromDefaultLibWithVaList(VaListTests.java:125)

was caused by the default library loading issue already detected previously on macOS in https://github.com/eclipse-openj9/openj9/issues/14487 and was resolved with our own fix in OpenJDK at https://github.com/ibmruntimes/openj9-openjdk-jdk17/pull/112/files#diff-9658a8d1507ae5132a614d4c38ed6589ebab5bed19c3d03f726585aeb49dce29, https://github.com/ibmruntimes/openj9-openjdk-jdk18/pull/57/files#diff-9658a8d1507ae5132a614d4c38ed6589ebab5bed19c3d03f726585aeb49dce29, https://github.com/ibmruntimes/openj9-openjdk-jdk19/pull/5/files#diff-9658a8d1507ae5132a614d4c38ed6589ebab5bed19c3d03f726585aeb49dce29 and https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/457/files#diff-9658a8d1507ae5132a614d4c38ed6589ebab5bed19c3d03f726585aeb49dce29 (not yet merged).

In addition, the tests on JDK19 are invalid given there is no our code in OpenJDK (the FFI specific code was totally removed in JDKnext due to the latest APIs in Java19) and all OpenJDK & OpenJ9 specific code are still under review. So I'll disable all test suites on all supported platforms in playlist.xml for the moment in case any partially merged code mess them up and re-enable them all after all code listed in https://github.com/eclipse-openj9/openj9/issues/15068 for Java17/18/19 are merged if this PR needs to be merged individually.

ChengJin01 avatar Jun 17 '22 20:06 ChengJin01

jenkins test sanity plinux jdk19

tajila avatar Jul 12 '22 14:07 tajila

jenkins test sanity amac jdk17

tajila avatar Jul 12 '22 14:07 tajila

I just updated the test cases based on the latest changes in OpenJDK and added a couple of tests requested by JIT (working on thunk code on zLinux). I also removed all Valist specific test cases as they are outdated at this point and will be totally replaced with new tests once we have Valist implemented on Power in OpenJDK.

ChengJin01 avatar Jul 27 '22 20:07 ChengJin01

I just updated part of tests in UpcallMHWithStructTests.java for JDK17/18/19+ to support struct specific upcall on Linux/s390x given the padding in these tests is not required on Linux/s390x as explained in the PR intended for thunk generation code at https://github.com/eclipse-openj9/openj9/pull/15596#issuecomment-1204682964.

ChengJin01 avatar Sep 08 '22 03:09 ChengJin01

I just updated this PR to add the VaList specific test cases in JDK19+ which is intended for the VaList changes at https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/488 and https://github.com/ibmruntimes/openj9-openjdk-jdk19/pull/27.

ChengJin01 avatar Sep 08 '22 04:09 ChengJin01

@ChengJin01 is testing disabled for x86?

tajila avatar Oct 03 '22 18:10 tajila

@ChengJin01 is testing disabled for x86?

Yes. All FFI related test suites are disabled on x86 in JDK17/18/19+ for the moment https://github.com/eclipse-openj9/openj9/blob/5b9e56396c9e0ac2bc2f2a35884cb29558f1a8d6/test/functional/Java17andUp/playlist.xml https://github.com/eclipse-openj9/openj9/blob/5b9e56396c9e0ac2bc2f2a35884cb29558f1a8d6/test/functional/Java18andUp/playlist.xml https://github.com/eclipse-openj9/openj9/blob/5b9e56396c9e0ac2bc2f2a35884cb29558f1a8d6/test/functional/Java19andUp/playlist.xml given the thunk generation code on x86 at https://github.com/eclipse-openj9/openj9/pull/15926 has not yet merged (still under code review).

ChengJin01 avatar Oct 03 '22 18:10 ChengJin01

jenkins test sanity,extended plinux,zlinux,aix,amac jdk19

tajila avatar Oct 03 '22 19:10 tajila

The downcall & upcall related test suites are enabled in JDK17/18/19+ on AIX & pLinux, zLinux and Aarch64 and VaList tests are only enabled on AIX & pLinux in JDK19+.

ChengJin01 avatar Oct 03 '22 20:10 ChengJin01

jenkins test sanity,extended plinux,zlinux,aix,amac jdk19

tajila avatar Oct 04 '22 04:10 tajila

I just updated a couple of latest native test code for VaList which were missing in this PR.

ChengJin01 avatar Oct 04 '22 04:10 ChengJin01

jenkins test sanity,extended plinux jdk19

tajila avatar Oct 04 '22 13:10 tajila

jenkins test sanity,extended zlinux,aix,amac jdk19

tajila avatar Oct 04 '22 16:10 tajila