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

8267095: Miscellaneous cleanups in vm.runtime.defmeth tests #4008

Closed
wants to merge 10 commits into from

Conversation

iwanowww
Copy link
Contributor

@iwanowww iwanowww commented May 13, 2021

Miscellaneous refactorings/cleanups in vm.runtime.defmeth tests.

In particular:

  • replace test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios with enumeration of different test configurations in tests themselves;
  • pass TestBuilder as a parameter and initiate test execution from executor;
  • switch max class file version tested from 52 to 61 (V17);
  • minor changes (cleanups, new test cases)

Testing:

  • vmTestbase/vm/runtime/defmeth/
  • hs-tier5-rt - hs-tier8-rt

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8267095: Miscellaneous cleanups in vm.runtime.defmeth tests

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4008/head:pull/4008
$ git checkout pull/4008

Update a local copy of the PR:
$ git checkout pull/4008
$ git pull https://git.openjdk.java.net/jdk pull/4008/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4008

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4008.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 13, 2021

👋 Welcome back vlivanov! 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 hotspot-runtime hotspot-runtime-dev@openjdk.org label May 13, 2021
@openjdk
Copy link

openjdk bot commented May 13, 2021

@iwanowww
The hotspot-runtime label was successfully added.

@iwanowww iwanowww marked this pull request as ready for review May 13, 2021 11:46
@openjdk openjdk bot added the rfr Pull request is ready for review label May 13, 2021
@mlbridge
Copy link

mlbridge bot commented May 13, 2021

Webrevs

@hseigel
Copy link
Member

hseigel commented May 25, 2021

JEP 306 (JDK-8175916) proposes removing ACC_STRICT for class file versions >= 61. See also #3891. So perhaps testing of ACC_STRICT should be removed from these tests?

@iwanowww
Copy link
Contributor Author

iwanowww commented May 25, 2021

Thanks for taking a look, Harold.

JEP 306 (JDK-8175916) proposes removing ACC_STRICT for class file versions >= 61. See also #3891. So perhaps testing of ACC_STRICT should be removed from these tests?

Good point. I went ahead and removed all ACC_STRICT-related code.

It could be kept for major version <= 60, but I don't see much sense in introducing additional test configuration. IMO testing ACC_STRICT / ACC_SYNCHRONIZED method flags has marginal value.

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Hi Vladimir,

I took a scan through this huge change and things look okay to me.

One thing we seem to have lost is the documentation for what this setup code:

/* majorVer / Set.of(MAX_MAJOR_VER),
/
flags / Set.of(0, ACC_SYNCHRONIZED),
/
redefine / Set.of(false, true),
/
execMode */ Set.of(DIRECT, REFLECTION, INVOKE_EXACT, INVOKE_GENERIC, INVOKE_WITH_ARGS, INDY));

actually means.

Also references to JVMS8 should probably just say JVMS.

Thanks,
David

@openjdk
Copy link

openjdk bot commented May 26, 2021

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

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

8267095: Miscellaneous cleanups in vm.runtime.defmeth tests

Reviewed-by: dholmes, hseigel

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 81 new commits pushed to 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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 26, 2021
for (int i = 0; i< majorVerValues.length; i++) {
majorVerValues[i] = minMajorVer + i;
majorVerValues[i] = MIN_MAJOR_VER + i;
}

Copy link
Member

Choose a reason for hiding this comment

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

Does this mean that the stress tests will run for all class versions between JDK 1.5 and JDK 17 ? If so, maybe change it to just run for JDK 1.5, 11, and 17 releases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It means that the stress test will randomly pick test cases with class file versions between MIN_MAJOR_VER and MAX_MAJOR_VER. IMO it's a decent compromise between testing only MIN_MAJOR_VER and MAX_MAJOR_VER (all other defmeth tests are configured that way) and always enumerating all the class file versions in every test (MIN_MAJOR_VER ... MAX_MAJOR_VER). So, I'd prefer to keep it as is.

Copy link
Member

Choose a reason for hiding this comment

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

That sounds good. Thanks!

Copy link
Member

@hseigel hseigel left a comment

Choose a reason for hiding this comment

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

This big cleanup looks good. I just had the one comment below about class file versions. Also, can you update the copyrights?
Thanks, Harold

@iwanowww
Copy link
Contributor Author

Thanks for the review, David.

One thing we seem to have lost is the documentation for what this setup code:
actually means.

Do you think additional comments can improve the situation?

Also references to JVMS8 should probably just say JVMS.

Fixed.

@mlbridge
Copy link

mlbridge bot commented May 27, 2021

Mailing list message from David Holmes on hotspot-runtime-dev:

On 27/05/2021 10:36 pm, Vladimir Ivanov wrote:

On Tue, 25 May 2021 22:06:45 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

Miscellaneous refactorings/cleanups in `vm.runtime.defmeth` tests.

In particular:
- replace `test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios` with enumeration of different test configurations in tests themselves;
- pass `TestBuilder` as a parameter and initiate test execution from executor;
- switch max class file version tested from 52 to 61 (`V17`);
- minor changes (cleanups, new test cases)

Testing:
- [x] vmTestbase/vm/runtime/defmeth/
- [x] hs-tier5-rt - hs-tier8-rt

Vladimir Ivanov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:

- Merge branch 'master' into 8267095.defmeth
- Remove ACC_STRICT-related code
- Cleanup
- Remove scenarios
- FIXME removal
- Fixes
- TestBuilder as a parameter

Thanks for the review, David.

One thing we seem to have lost is the documentation for what this setup code:
actually means.

Do you think additional comments can improve the situation?

I was thinking more of restoring something to the readme.

Also references to JVMS8 should probably just say JVMS.

Fixed.

Thanks,
David

1 similar comment
@mlbridge
Copy link

mlbridge bot commented May 27, 2021

Mailing list message from David Holmes on hotspot-runtime-dev:

On 27/05/2021 10:36 pm, Vladimir Ivanov wrote:

On Tue, 25 May 2021 22:06:45 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

Miscellaneous refactorings/cleanups in `vm.runtime.defmeth` tests.

In particular:
- replace `test/hotspot/jtreg/vmTestbase/vm/runtime/defmeth/scenarios` with enumeration of different test configurations in tests themselves;
- pass `TestBuilder` as a parameter and initiate test execution from executor;
- switch max class file version tested from 52 to 61 (`V17`);
- minor changes (cleanups, new test cases)

Testing:
- [x] vmTestbase/vm/runtime/defmeth/
- [x] hs-tier5-rt - hs-tier8-rt

Vladimir Ivanov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:

- Merge branch 'master' into 8267095.defmeth
- Remove ACC_STRICT-related code
- Cleanup
- Remove scenarios
- FIXME removal
- Fixes
- TestBuilder as a parameter

Thanks for the review, David.

One thing we seem to have lost is the documentation for what this setup code:
actually means.

Do you think additional comments can improve the situation?

I was thinking more of restoring something to the readme.

Also references to JVMS8 should probably just say JVMS.

Fixed.

Thanks,
David

@mlbridge
Copy link

mlbridge bot commented May 31, 2021

Mailing list message from Vladimir Ivanov on hotspot-runtime-dev:

Do you think additional comments can improve the situation?

I was thinking more of restoring something to the readme.

Does it look better?

https://github.com//pull/4008/commits/66cda654f93e30ad1a6b72c29fb83e84c1a7ae58

Best regards,
Vladimir Ivanov

1 similar comment
@mlbridge
Copy link

mlbridge bot commented May 31, 2021

Mailing list message from Vladimir Ivanov on hotspot-runtime-dev:

Do you think additional comments can improve the situation?

I was thinking more of restoring something to the readme.

Does it look better?

https://github.com//pull/4008/commits/66cda654f93e30ad1a6b72c29fb83e84c1a7ae58

Best regards,
Vladimir Ivanov

@mlbridge
Copy link

mlbridge bot commented May 31, 2021

Mailing list message from David Holmes on hotspot-runtime-dev:

On 31/05/2021 9:19 pm, Vladimir Ivanov wrote:

Do you think additional comments can improve the situation?

I was thinking more of restoring something to the readme.

Does it look better?

https://github.com//pull/4008/commits/66cda654f93e30ad1a6b72c29fb83e84c1a7ae58

Yes thanks.

So these tests will now be updated on each release to update the max
version?

David
-----

Best regards,
Vladimir Ivanov

1 similar comment
@mlbridge
Copy link

mlbridge bot commented May 31, 2021

Mailing list message from David Holmes on hotspot-runtime-dev:

On 31/05/2021 9:19 pm, Vladimir Ivanov wrote:

Do you think additional comments can improve the situation?

I was thinking more of restoring something to the readme.

Does it look better?

https://github.com//pull/4008/commits/66cda654f93e30ad1a6b72c29fb83e84c1a7ae58

Yes thanks.

So these tests will now be updated on each release to update the max
version?

David
-----

Best regards,
Vladimir Ivanov

@mlbridge
Copy link

mlbridge bot commented May 31, 2021

Mailing list message from Vladimir Ivanov on hotspot-runtime-dev:

Does it look better?
https://github.com//pull/4008/commits/66cda654f93e30ad1a6b72c29fb83e84c1a7ae58

Yes thanks.

So these tests will now be updated on each release to update the max
version?

Yes. (It is desirable, but not strictly required.)

I also thought about other options (either (1) automatically detect
maximally supported major class file version; or (2) introduce a central
place in test library to expose the value), but decided to leave it for
a future enhancement.

Best regards,
Vladimir Ivanov

1 similar comment
@mlbridge
Copy link

mlbridge bot commented May 31, 2021

Mailing list message from Vladimir Ivanov on hotspot-runtime-dev:

Does it look better?
https://github.com//pull/4008/commits/66cda654f93e30ad1a6b72c29fb83e84c1a7ae58

Yes thanks.

So these tests will now be updated on each release to update the max
version?

Yes. (It is desirable, but not strictly required.)

I also thought about other options (either (1) automatically detect
maximally supported major class file version; or (2) introduce a central
place in test library to expose the value), but decided to leave it for
a future enhancement.

Best regards,
Vladimir Ivanov

@iwanowww
Copy link
Contributor Author

iwanowww commented Jun 1, 2021

Thanks for the reviews, Harold and David.

/integrate

@openjdk openjdk bot closed this Jun 1, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 1, 2021
@openjdk
Copy link

openjdk bot commented Jun 1, 2021

@iwanowww Since your change was applied there have been 89 commits pushed to the master branch:

  • 6149b9a: 8267914: Remove DeferredObjectToKlass workaround
  • 4eb2168: 8267670: Update java.io, java.math, and java.text to use switch expressions
  • f5634fe: 8267979: C2: Fix verification code in SubTypeCheckNode::Ideal()
  • ae2f37f: 8267616: AArch64: Fix AES assertion messages in stubGenerator_aarch64.cpp
  • c06db45: 8267921: Remove redundant loop from sun.reflect.misc.ReflectUtil.privateCheckPackageAccess()
  • 382e7ec: 8246351: elements in headings are of incorrect size
  • 5df25dc088cfc3069e451b48c4f013d1d0491aa2: 8266807: Windows os_windows-gtest broken for UseLargePages
  • ce44cd6881bcbef81a840d7961a951ba586c0eae: 8267845: Add @requires to avoid running G1 large pages test with wrong page size
  • 4ade125c8a53e0bdc105e5f65e8c1d7aa13db950: 8267934: remove dead code in CLD
  • bd31653e6f99d4337e4af1f7f138d688ec99c19d: 8267938: (sctp) SCTP channel factory methods should check platform support
  • ... and 79 more: https://git.openjdk.java.net/jdk/compare/ebc9357d58957702abbd003d21082badc630876d...master

Your commit was automatically rebased without conflicts.

Pushed as commit 229a6e2f3646bfb52708e4f865bd55a838b8222d.

:bulb: 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
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants