-
Notifications
You must be signed in to change notification settings - Fork 78
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
7903193: [jtreg] build and test failures using JDK 18 #190
base: master
Are you sure you want to change the base?
Conversation
/issue 7903645 |
👋 Welcome back jpai! A progress list of the required criteria for merging this PR into |
@jaikiran |
/issue 7903646 |
@jaikiran |
With your changes, I get |
Thank you Ludvig for testing this. I'm happy to hear that it now passes. |
❗ This change is not yet ready to be integrated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to come up with a better way for jtreg
to deal with the lack of a security manager.
That being, said, we obviously are using jtreg
to run on recent versions of JDK, and this PR is just about fixing the tests, not about changing jtreg
functionality itself, at this time.
make/build.sh
Outdated
@@ -784,6 +785,7 @@ make ASMTOOLS_JAR="${ASMTOOLS_JAR}" \\ | |||
JUNIT_NOTICES="${JUNIT_NOTICES}" \\ | |||
TESTNG_JARS="${TESTNG_JARS}" \\ | |||
TESTNG_NOTICES="${TESTNG_NOTICES}" \\ | |||
JAVA_SPECIFICATION_VERSION="${JAVA_SPECIFICATION_VERSION}" \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the list of variables is sorted alphabetically.
test/basic/ReportOnlyTest.gmk
Outdated
@@ -40,6 +35,7 @@ $(BUILDTESTDIR)/ReportOnlyTest.ok: $(BUILDTESTDIR)/Basic.othervm.ok \ | |||
$(JTREG_IMAGEDIR)/bin/jtreg | |||
JAVA_HOME=$(JDKHOME) CLASSPATH=$(ABSCLASSDIR) \ | |||
$(JTREG_IMAGEDIR)/bin/jtreg $(JTREG_OPTS) \ | |||
-k:!needDisplay \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unrelated to the security manager changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry Jon, I forgot to reply to this comment. I'll refresh this PR against latest master branch and refresh my memory about this change and respond shortly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the other PR #223 now integrated, this part of the change in this PR is no longer needed. So I've removed it in the latest updates to this PR.
@jaikiran This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@jaikiran This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
/open |
@jaikiran This pull request is now open |
I've now updated the PR to only contain the Java 18+ changes. I have verified the latest changes against Java versions less than 18 as well as greater than 18, both when headless is true and when headless is false. All self tests continue to pass and jtreg builds successfully in all these combinations. |
Heads-up for after #217 has been integrated, the basic test number counters need an update, again. |
I've now updated the PR after merging against latest master. I have verified that with these changes, all self tests continue to pass with Java versions less than 18 as well as greater than 18, both when headless is true and when headless is false. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - @jonathan-gibbons do you agree?
@jaikiran Can you please replace the That should make a) the test workflow download an Oracle JDK and b) also run the build (compilation and tests) on a JDK 18+. Background: https://www.oracle.com/java/technologies/jdk-script-friendly-urls/
|
I wasn't sure if we should do that change as part of this PR, so I created a separate branch which includes the changes in this PR plus the change to the JDK version in the github workflow file. That branch's job is currently in progress here https://github.com/jaikiran/jtreg/actions/runs/11385998691/job/31677151971 |
If that build succeeds and if you think that we should include that change in this PR, let me know and I'll update this PR to include that change. |
Sounds good to me. |
Can I please get a review of this test only changes, which proposes to address the current failure in jtreg self tests when Java 18 or higher is used to build and test jtreg?
As noted in the following issues:
https://bugs.openjdk.org/browse/CODETOOLS-7903193
https://bugs.openjdk.org/browse/CODETOOLS-7903646
https://bugs.openjdk.org/browse/CODETOOLS-7903645
these self tests in jtreg which rely on SecurityManager, no longer pass when used with Java 18 or higher, since starting Java 18 the setting of SecurityManager throws an UnsupportedOperationException.
Changes in this PR, include updates to test files which check for the Java version being used to run these tests and then decide whether or not to include some specific tests that only pass when a SecurityManager is set.
I've run these changes locally (on macos M1) and on a linux setup, both with Java 17 and Java 21. The tests all pass on these versions.
I've also run this on a headless system to make sure the
ReportOnlyTest.gmk
does indeed properly check the correct values on a headless system (both Java 17 and 21). I think this change should address the issue that Ludvig @LudwikJaniuk had run into.Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jtreg.git pull/190/head:pull/190
$ git checkout pull/190
Update a local copy of the PR:
$ git checkout pull/190
$ git pull https://git.openjdk.org/jtreg.git pull/190/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 190
View PR using the GUI difftool:
$ git pr show -t 190
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jtreg/pull/190.diff
Webrev
Link to Webrev Comment