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

8294863: Enable partial tier1 testing in GHA for JDK8 #131

Closed
wants to merge 1 commit into from

Conversation

zzambers
Copy link
Contributor

@zzambers zzambers commented Oct 5, 2022

This change adds support for tier1 testing in github actions by fixing workflow to work with JDK8. (Changes were needed due to build system difference compared to newer JDK.) Support for running tests is done for all systems. This includes adding code to run tests on windows x86, which was missing. Currently only jdk_tier1 on linuxes and macos is enabled, as currently only this is passing without failures (see details lower). Testing on windows is currently disabled (no tier1 groups are passing there currently). Disabled tests can be easily enabled once, they are fixed. Ultimate goal is of course to run all tier1 groups (jdk_tier1, langtools_tier1, hotspot_tier1) on all platforms.

Tier1 status:

jdk_tier1

  • enabled on linuxes and macos (passes there)
  • disabled on on windows, where com/sun/jdi/*.sh shell tests are currently failing

langtools_tier1

  • disabled everywhere
  • 1 failure: tools/javac/diags/CheckExamples.java (all platforms, see: [1])

hotspot_tier1

  • disabled everywhere
  • there are several faiures of compiler/rtm/* tests. These tests seem to broken on some systems (see: [2]), including machines used by GHA. Some tests are already excluded [3], but there are few more. Also exclusions were made only on x64 but it also affects x86.
  • on x86 (32-bit) platforms there are few additional failures

[1] https://bugs.openjdk.org/browse/JDK-8265527
[2] https://bugs.openjdk.org/browse/JDK-8183263
[3] https://bugs.openjdk.org/browse/JDK-8226899


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8294863: Enable partial tier1 testing in GHA for JDK8

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev pull/131/head:pull/131
$ git checkout pull/131

Update a local copy of the PR:
$ git checkout pull/131
$ git pull https://git.openjdk.org/jdk8u-dev pull/131/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 131

View PR using the GUI difftool:
$ git pr show -t 131

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/131.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 5, 2022

👋 Welcome back zzambers! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@zzambers zzambers changed the title 8265527: Enable initial tier1 testing in GHA for JDK8 8294863: Enable initial tier1 testing in GHA for JDK8 Oct 5, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 5, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 5, 2022

Webrevs

@openjdk-notifier
Copy link

@zzambers Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information.

@jerboaa
Copy link
Contributor

jerboaa commented Oct 5, 2022

@zzambers Very nice! Yes, please. Could you enable GHA for this PR so that test results are visible here? At least I don't see builds being done via GHA.

@zzambers
Copy link
Contributor Author

zzambers commented Oct 5, 2022

@jerboaa, thanks, GHA are currently running on branch, from which PR was made, in my repo. I hope, they will then show up here. (If not, I am not sure what to do to make them show up.)

@zzambers
Copy link
Contributor Author

zzambers commented Oct 5, 2022

I think that was maybe some glitch by GH. Results were not showing up at first, later started to (somewhat randomly) appear. However now it seems they are displaying correctly.

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

Thanks! This is an improvement to the current status quo (no tests via GHA). No risk for product code as it's only changing .github directory files. Looking forward to getting more tests enabled.

@zzambers zzambers changed the title 8294863: Enable initial tier1 testing in GHA for JDK8 8294863: Enable partial tier1 testing in GHA for JDK8 Oct 11, 2022
@openjdk
Copy link

openjdk bot commented Oct 11, 2022

@zzambers This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8294863: Enable partial tier1 testing in GHA for JDK8

Reviewed-by: sgehwolf

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@jerboaa) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 11, 2022
@zzambers
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Oct 11, 2022
@openjdk
Copy link

openjdk bot commented Oct 11, 2022

@zzambers
Your change (at version d18b013) is now ready to be sponsored by a Committer.

@zzambers
Copy link
Contributor Author

@jerboaa thanks

@jerboaa
Copy link
Contributor

jerboaa commented Oct 11, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Oct 11, 2022

Going to push as commit a93344b.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 11, 2022
@openjdk openjdk bot closed this Oct 11, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Oct 11, 2022
@openjdk
Copy link

openjdk bot commented Oct 11, 2022

@jerboaa @zzambers Pushed as commit a93344b.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@gnu-andrew
Copy link
Member

Hmm, just seen this. I'm not keen on how much this is diverging from the other JDKs. We'll likely need to revert some of this when backporting bundle support.

Do we not need a test bundle for running the tests? I had a feeling that was the case, as 8u doesn't have GTest, but wasn't 100%

@zzambers
Copy link
Contributor Author

zzambers commented Oct 17, 2022

Hmm, just seen this. I'm not keen on how much this is diverging from the other JDKs. We'll likely need to revert some of this when backporting bundle support.

Sorry if I was interfering with something, you are working on. Just wanted to have tier1 testing enabled in GHA as it makes backporting much more convenient. If you do some backports, making JDK8 closer to newer JDKs, feel free to revert (update) parts of my changes concerning this matter.

Do we not need a test bundle for running the tests? I had a feeling that was the case, as 8u doesn't have GTest, but wasn't 100%

When it comes to test bundle/image support, I am not sure there is currently use for this in JDK8 (tests in their current form). As far as I understand it, test image is mostly for tests, which make use of JNI. Native test libraries in newer JDKs are then built by build system and path to built libraries is then passed to jtreg using -nativepath argument [1]. Test image allows to (pre)build these, so they don't have to be built at test time.

However from what I can tell, JDK8 does not (yet) use this approach (building native test libraries by built system in makefiles). Instead tests which make use of JNI are implemented as shell tests and they build native libraries as part of test run. [2] (Other tests using JNI mostly follow similar boilerplate, with some modifications)

When testing GHA is concerned, I don't think, tests using JNI are causing any big problems. You just need working C/C++ compiler at test time. This is not really an issue especially when all tests using JNI seem excluded on Windows [3]. Only problem I have seen was multilib configuration (32-bit JDK on 64-bit linux). While some tests can handle this case correctly using appropriate C/C++ compiler arguments [4], few have a problem of building 64bit JNI library for 32bit JDK and fail. There are only 3 tests affected by this in tier1 (concretely in hotspot_tier1) and they should be easy enough to fix.

compiler/criticalnatives/argumentcorruption/Test8167409.sh 
runtime/jni/CallWithJNIWeak/test.sh 
runtime/jni/ReturnJNIWeak/test.sh 

So while newer JDK probably use cleaner approach for building native test libraries and running tests in general, I don't see it as a high priority in JDK8 (At least when it comes to GHA).

[1] https://github.com/openjdk/jdk/blob/ae60599e2ba75d80c3b4279903137b2c549f8066/make/RunTests.gmk#L801
[2]

$cc_cmd -fPIC -shared -o libCallWithJNIWeak.so \

[3]
[4]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
3 participants