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

8303773: Replace "main.wrapper" with "test.thread.factory" property in test code #15950

Closed
wants to merge 3 commits into from

Conversation

lmesnik
Copy link
Member

@lmesnik lmesnik commented Sep 27, 2023

The main.wrapper was the first name for jtreg test thread factory plugin. However, during integration of this feature in jtreg it was decided to use test.thread.factory name. So this fix just renames "main.wrapper" property to "test.thread.factory" so it is more compliant with jtreg naming. Also, it makes more sense for tests when it is used to create other then main threads in test.
Testing: tier1-5.
Verified that "main.wrapper" is not used in test sources anymore.

I haven't rename DebugeeWrapperd and MainWrapper classes in JDI test frameworks because they are actually more main wrappers than thread factories.


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-8303773: Replace "main.wrapper" with "test.thread.factory" property in test code (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15950/head:pull/15950
$ git checkout pull/15950

Update a local copy of the PR:
$ git checkout pull/15950
$ git pull https://git.openjdk.org/jdk.git pull/15950/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15950

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15950.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 27, 2023

👋 Welcome back lmesnik! 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 Sep 27, 2023
@openjdk
Copy link

openjdk bot commented Sep 27, 2023

@lmesnik The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot-runtime
  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Sep 27, 2023
@lmesnik
Copy link
Member Author

lmesnik commented Sep 27, 2023

/label remove core-libs

@openjdk openjdk bot removed the core-libs core-libs-dev@openjdk.org label Sep 27, 2023
@openjdk
Copy link

openjdk bot commented Sep 27, 2023

@lmesnik
The core-libs label was successfully removed.

@lmesnik
Copy link
Member Author

lmesnik commented Sep 27, 2023

/label remove hotspot-runtime

@openjdk openjdk bot removed the hotspot-runtime hotspot-runtime-dev@openjdk.org label Sep 27, 2023
@openjdk
Copy link

openjdk bot commented Sep 27, 2023

@lmesnik
The hotspot-runtime label was successfully removed.

@mlbridge
Copy link

mlbridge bot commented Sep 27, 2023

Webrevs

Copy link
Contributor

@plummercj plummercj left a comment

Choose a reason for hiding this comment

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

Just one minor formatting request. Otherwise changes look good.

@@ -225,7 +225,7 @@ else if (args[i].equals("-iterations"))
iterations = Integer.parseInt(args[++i]);
}
// Allow to force using vthreads using wrapper property
if(System.getProperty("main.wrapper") != null && System.getProperty("main.wrapper").equals("Virtual")) {
if("Virtual".equals(System.getProperty("test.thread.factory"))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Need a space after the if.

@openjdk
Copy link

openjdk bot commented Sep 28, 2023

@lmesnik 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:

8303773: Replace "main.wrapper" with "test.thread.factory" property in test code

Reviewed-by: cjplummer, amenkov

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

  • 5a6aa56: 8303959: tools/jpackage/share/RuntimePackageTest.java fails with java.lang.AssertionError missing files
  • 014c95a: 8317126: Redundant entries in Windows tzmappings file
  • fa0697a: 8316998: Remove redundant type arguments in the java.util.stream package
  • 49376e4: 8316000: File.setExecutable silently fails if file does not exist
  • a185be0: 8317139: [JVMCI] oop handles clearing message pollutes event log
  • 179792b: 8317283: jpackage tests run osx-specific checks on windows and linux
  • bd918f4: 8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"
  • c45308a: 8301327: convert assert to guarantee in Handle_IDiv_Exception
  • bd7bb67: 8317257: RISC-V: llvm build broken
  • 0259da9: 8301686: TLS 1.3 handshake fails if server_name doesn't match resuming session
  • ... and 27 more: https://git.openjdk.org/jdk/compare/750da0012931656cfd55f3e67c3f49ad7363ab8e...master

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 Sep 28, 2023
@@ -708,8 +708,8 @@ private Map<String,? extends Argument> setupLaunchingConnector(LaunchingConnecto

String cmdline = classToExecute + " " + ArgumentHandler.joinArguments(rawArgs, quote);

if(System.getProperty("main.wrapper") != null) {
cmdline = MainWrapper.class.getName() + " " + System.getProperty("main.wrapper") + " " + cmdline;
if(System.getProperty("test.thread.factory") != null) {

Choose a reason for hiding this comment

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

Please add space after if

@@ -350,9 +350,9 @@ public String[] makeCommandLineArgs(String classToExecute, String transportAddre

args.add(jdwpArgs);

if(System.getProperty("main.wrapper") != null) {
if(System.getProperty("test.thread.factory") != null) {

Choose a reason for hiding this comment

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

Please add space after if

@lmesnik
Copy link
Member Author

lmesnik commented Oct 3, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Oct 3, 2023

Going to push as commit 89987db.
Since your change was applied there have been 67 commits pushed to the master branch:

  • 0e501f6: 8308429: jvmti/StopThread/stopthrd007 failed with "NoClassDefFoundError: Could not initialize class jdk.internal.misc.VirtualThreads"
  • c47a0ce: 8317235: Remove Access API use in nmethod class
  • 353d139: 8317340: Windows builds are not reproducible if MS VS compiler install path differs
  • 3bcfac1: 8317246: Cleanup java.net.URLEncoder and URLDecoder use of file.encoding property
  • b6a97c0: 8316880: AArch64: "stop: Header is not fast-locked" with -XX:-UseLSE since JDK-8315880
  • 287b243: 8316893: Compile without -fno-delete-null-pointer-checks
  • 26c21f5: 8314294: Unsafe::allocateMemory and Unsafe::freeMemory are slower than malloc/free
  • 6e1aacd: 8296631: NSS tests failing on OL9 linux-aarch64 hosts
  • d2e2c4c: 8309667: TLS handshake fails because of ConcurrentModificationException in PKCS12KeyStore.engineGetEntry
  • e25121d: 8316929: Shenandoah: Shenandoah degenerated GC and full GC need to cleanup old OopMapCache entries
  • ... and 57 more: https://git.openjdk.org/jdk/compare/750da0012931656cfd55f3e67c3f49ad7363ab8e...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 3, 2023

@lmesnik Pushed as commit 89987db.

💡 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 serviceability serviceability-dev@openjdk.org
3 participants