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

JDK-8319569: Several java/util tests should be updated to accept VM flags #16705

Conversation

justin-curtis-lu
Copy link
Member

@justin-curtis-lu justin-curtis-lu commented Nov 17, 2023

Please review this PR which allows these j.util tests to launch new JVM processes with VM flags,

This is primarily done using by switching to ProcessTools::createTestJavaProcessBuilder.


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-8319569: Several java/util tests should be updated to accept VM flags (Sub-task - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16705

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 17, 2023

👋 Welcome back jlu! 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 17, 2023
@openjdk
Copy link

openjdk bot commented Nov 17, 2023

@justin-curtis-lu The following labels will be automatically applied to this pull request:

  • core-libs
  • i18n

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 core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org labels Nov 17, 2023
@mlbridge
Copy link

mlbridge bot commented Nov 17, 2023

Webrevs

@@ -27,6 +27,7 @@
# 8157138 8190904
# @summary tests the capability of replacing the currency data with user
# specified currency properties file
# @requires vm.flagless
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 actually do anything? Since it is a shell script, it does not call any ProcessBuilder methods. In fact, the script includes ${TESTVMOPTS} on launching the test java process correctly.

Copy link
Member Author

Choose a reason for hiding this comment

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

IIUC, using @requires vm.flagless simply signifies that any JVMs launched within the test do not support VM flags, (regardless if it was launched from ProcessBuilder).

However, it is odd that this test was flagged since it does pass ${TESTVMOPTS} to run() like you stated.

Perhaps @lmesnik has further understanding of what to do here?

Copy link
Member Author

Choose a reason for hiding this comment

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

PropertiesTest.sh needs to pass both test.vm.opts and test.java.opts. Added ${TESTJAVAOPTS} and unmarked as @requires vm.flagless

Comment on lines 166 to 167
private static final List<String> javaChildArgs = Arrays.asList(
"-classpath", classpath, "LoggingDeadlock2$JavaChild");
Copy link
Member

Choose a reason for hiding this comment

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

Could use List.of()

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed here and in other instances.

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2013 Google Inc. All rights reserved.
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Is this OK? The header reads DO NOT ALTER.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think you're right. I based my decision off #15454

But after reading the copyright guidelines, we do not modify third party copyright. It should probably be removed in that test as well.

@justin-curtis-lu justin-curtis-lu changed the title JDK-8319569: Several java/util tests should be updated to accept VM flags. JDK-8319569: Several java/util tests should be updated to accept VM flags Nov 17, 2023
@dfuch
Copy link
Member

dfuch commented Nov 20, 2023

Changes to the logging tests LGTM. Thanks for the update @justin-curtis-lu .

Copy link
Member

@naotoj naotoj left a comment

Choose a reason for hiding this comment

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

LGTM. It is out of this fix's scope, but PropertiesTest.sh may better be converted into a Java test case.

@openjdk
Copy link

openjdk bot commented Nov 20, 2023

@justin-curtis-lu 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:

8319569: Several java/util tests should be updated to accept VM flags

Reviewed-by: naoto, lancea

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

  • e47cf61: 8074211: javax.sound.midi: Error with send System Exclusive messages of different length
  • 6d82436: 8320278: ARM32 build is broken after JDK-8301997
  • f69e665: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout
  • 1c0bd81: 8319124: Update XML Security for Java to 3.0.3
  • 61d81d6: 8317742: ISO Standard Date Format implementation consistency on DateTimeFormatter and String.format
  • c4aba87: 8320272: Make method_entry_barrier address shared
  • 9311749: 8320526: Use title case in building.md
  • 9598ff8: 8315969: compiler/rangechecks/TestRangeCheckHoistingScaledIV.java: make flagless
  • 53eb6f1: 8187591: -Werror turns incubator module warning to an error
  • 570dffb: 8310807: java/nio/channels/DatagramChannel/Connect.java timed out
  • ... and 47 more: https://git.openjdk.org/jdk/compare/9727f4bdddc071e6f59806087339f345405ab004...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 Nov 20, 2023
@justin-curtis-lu
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 23, 2023

Going to push as commit 2bb4b93.
Since your change was applied there have been 79 commits pushed to the master branch:

  • 6016536: 8314745: JFR: @StackFilter
  • aac4318: 8320577: Improve MessageHeader's toString() function to make HttpURLConnection's debug log readable
  • 572b14a: 8320536: problemlist failing serviceability/attach/ConcAttachTest.java test on macosx
  • 30462f9: 8318986: Improve GenericWaitBarrier performance
  • 407cdd4: 8320207: doclet incorrectly chooses code font for a See Also link
  • 1629a90: 8320331: G1 Full GC Heap verification relies on metadata not reset before verification
  • 93bdc2a: 8306055: Add a built-in Catalog to JDK XML module
  • a4bd9e4: 8319440: RISC-V: jdk can't be built with clang due to register keyword
  • 524da14: 8320418: PPC64: invokevfinal_helper duplicates code to handle ResolvedMethodEntry
  • 5d4a54b: 8319449: compiler/print/CompileCommandPrintMemStat.java fails on Graal
  • ... and 69 more: https://git.openjdk.org/jdk/compare/9727f4bdddc071e6f59806087339f345405ab004...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 23, 2023

@justin-curtis-lu Pushed as commit 2bb4b93.

💡 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
core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org integrated Pull request has been integrated
4 participants