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

Add OpenJcePlusTests #5024

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Add OpenJcePlusTests #5024

merged 1 commit into from
Feb 2, 2024

Conversation

llxia
Copy link
Contributor

@llxia llxia commented Jan 31, 2024

related: #4979

This PR has to be merged with adoptium/TKG#493

@llxia
Copy link
Contributor Author

llxia commented Jan 31, 2024

  • For Semeru, OpenJcePlusTests is enabled as part of extended.functional on JDK17 aix, pliunx, xlinux, and wins64 atm. There are no special settings. The tests will take ~40mins to run.
  • For custom JVM that wants to run OpenJcePlusTests, set TEST_FLAG=OpenJcePlusTests and TARGET=disabled.openJcePlusTests

Testing:

  • regular run: Grinder
  • disabled for openj9: Grinder
  • rerun openj9 with TEST_FLAG=OpenJcePlusTests: Grinder - OpenJcePlusTests compiled as expected. The Grinder failed due to Openj9 SDK is used.
  • disabled for mac: Grinder

@llxia llxia force-pushed the mytest branch 6 times, most recently from 68b9b09 to 98a62b1 Compare February 1, 2024 14:38
@llxia
Copy link
Contributor Author

llxia commented Feb 1, 2024

@jasonkatonica could you also review this PR? Thanks

<mkdir dir="${build}" />
</target>

<property name="addExports" value='--add-exports java.base/sun.security.internal.spec=openjceplus --add-exports java.base/sun.security.util=openjceplus --add-exports java.base/sun.security.x509=openjceplus --add-exports java.base/sun.security.pkcs=openjceplus --add-exports java.base/sun.security.internal.interfaces=openjceplus --add-exports java.base/sun.util.logging=openjceplus --add-exports java.base/jdk.internal.logger=openjceplus --add-exports openjceplus/com.ibm.crypto.plus.provider.ock=ALL-UNNAMED --add-exports java.base/sun.security.util=ALL-UNNAMED --add-exports java.base/sun.security.x509=ALL-UNNAMED --add-exports openjceplus/com.ibm.misc=ALL-UNNAMED --add-exports java.base/sun.security.pkcs=ALL-UNNAMED' />
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest to add exports to multiple modules for the same package - --add-exports java.base/sun.security.util=openjceplus,ALL-UNNAMED

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Jason.

Signed-off-by: Lan Xia <[email protected]>
@llxia
Copy link
Contributor Author

llxia commented Feb 2, 2024

Grinder with the latest update: link

<property name="DEST" value="${BUILD_ROOT}/functional/OpenJcePlusTests" />

<!--Properties for this particular build-->
<property name="src" location="./OpenJCEPlus/src/" />
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that we should be compiling and putting into a jar file just the test directories. I am not quite sure what would happen if we compile both the openjceplus provider itself and the test code like this. When the tests run do they test the OpenJCEPlus module included in the build itself or would they test what you just compiled? Id hope they test what is in the Semeru build itself.

To be safe should we be compiling just the files in the src/test directory here?

Or perhaps line 52 handles that and removes everything but the test directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we only compile tests and put them openjceplus-tests.jar into

<jar jarfile="${DEST}/openjceplus-tests.jar" filesonly="true">

line 52 removed everything but the test directory.

<disables>
<disable>
<comment>only applicable for Semeru atm</comment>
<vendor>eclipse</vendor>
Copy link
Contributor

Choose a reason for hiding this comment

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

When testing a custom built openj9 build with OpenJCEPlus bundling turned on for development builds ( not the default for public nightly openj9 builds ) would these tests still be able to be run? I believe the answer is yes yet I am asking anyways due to this disablement of the tests when the vendor is eclipse.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, custom built openj9 build with OpenJCEPlus bundling can still run by setting TEST_FLAG=OpenJcePlusTests (for test compilation) and TARGET=disabled.openJcePlusTests (for test execution)

-->
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../TKG/playlist.xsd">
<test>
<testCaseName>openJcePlusTests</testCaseName>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the framework run junit tests as individual tests such that they are reported with stack traces and as individual test passes and failures? I only noticed this looking at the results where after running 1800+ tests it reports just one test failed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In general, if the tests produce junit result report in xml, our framework will pick it up and show subtests. For example, testReport link. However, it looks like junit itself does not provide the report. The OpenJcePlusTests do not produce any output files. It looks like we will need to leverage ant and junit Integration <junit> or maven for this.

It may be better to get PR in, so we can get the test running. Meanwhile, we will look into junit output for OpenJcePlusTests.

Copy link
Contributor

@jasonkatonica jasonkatonica left a comment

Choose a reason for hiding this comment

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

LGTM

@karianna karianna merged commit dca6d77 into adoptium:master Feb 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants