Skip to content

8296959: Fix hotspot shell tests of 8u on multilib systems #173

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

Closed

Conversation

zzambers
Copy link
Contributor

@zzambers zzambers commented Nov 14, 2022

Few hotspot tests (from hotspot/tier1) currently fail for x86 (32-bit) builds on 64-bit system (Linux).

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

Problem:
Tests build 64-bit JNI libraries and trying to use them for 32-bit jdk, resulting in error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/runner/work/jdk8u-dev/jdk8u-dev/test-results/testoutput/hotspot_tier1/JTwork/scratch/libCNCheckLongArgs.so: /home/runner/work/jdk8u-dev/jdk8u-dev/test-results/testoutput/hotspot_tier1/JTwork/scratch/libCNCheckLongArgs.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)

These tests only target Linux and (some) Solaris.

Solution:
Fixed by supplying appropriate compiler argument (-m32) to build 32-bit libraries for 32-bit JDK. (Some tests already did that, but not in uniform way). I verified in manpage of gcc that -m32 argument is supported for all 32-bit variants of architectures supported by JDK 8 [1]. Solaris cc also seems to support -m32 [2].
This fix is JDK 8 only as newer JDK use new approach, where JNI test libraries are build are build system and tests not longer build them themselfs.

Testing:
Change fixed these tests on linux-x86. (tested here [3])
Tests are part of hotspot/tier1. This is one of problems, which needs to be fixed, so that hotspot/tier1 can be enabled in GHA on linux-x86. Other one is JDK-8295952 [4] (will need to get fixed and backported).

[1] https://man7.org/linux/man-pages/man1/gcc.1.html
[2] https://docs.oracle.com/cd/E37069_01/html/E54439/cc-1.html
[3] https://github.com/zzambers/jdk8u-dev/actions/runs/3441392968
[4] https://bugs.openjdk.org/browse/JDK-8295952


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-8296959: Fix hotspot shell tests of 8u on multilib systems

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 173

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 14, 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.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 14, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 14, 2022

Webrevs

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.

Seems OK to me.

@openjdk
Copy link

openjdk bot commented Nov 15, 2022

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

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

8296959: Fix hotspot shell tests of 8u on multilib systems

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 3 new commits pushed to the master branch:

  • 17fd40a: 8295714: GHA ::set-output is deprecated and will be removed
  • 2f509c7: 8159599: [TEST_BUG] java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java
  • f6d869f: 8221529: [TESTBUG] Docker tests use old/deprecated image on AArch64

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this 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 Nov 15, 2022
@zzambers
Copy link
Contributor Author

@jerboaa thank you for review
/integrate

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

openjdk bot commented Nov 15, 2022

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

@jerboaa
Copy link
Contributor

jerboaa commented Nov 15, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 15, 2022

Going to push as commit 7024bf0.
Since your change was applied there have been 3 commits pushed to the master branch:

  • 17fd40a: 8295714: GHA ::set-output is deprecated and will be removed
  • 2f509c7: 8159599: [TEST_BUG] java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java
  • f6d869f: 8221529: [TESTBUG] Docker tests use old/deprecated image on AArch64

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 15, 2022
@openjdk openjdk bot closed this Nov 15, 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 Nov 15, 2022
@openjdk
Copy link

openjdk bot commented Nov 15, 2022

@jerboaa @zzambers Pushed as commit 7024bf0.

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

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
Development

Successfully merging this pull request may close these issues.

2 participants