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

8276634: Remove usePlainDatagramSocketImpl option from the test DatagramChannel/SendReceiveMaxSize.java #6252

Closed
wants to merge 1 commit into from

Conversation

pconcannon
Copy link
Contributor

@pconcannon pconcannon commented Nov 4, 2021

Hi,

Could someone please review my changes for removing the usePlainDatagramSocketImpl option from the test DatagramChannel/SendReceiveMaxSize.java?

The option usePlainDatagramSocketImpl was not removed during JDK-8253119 - Remove the legacy PlainSocketImpl and PlainDatagramSocketImpl implementation. As these implementations have now been removed from the JDK, tests no longer need to check against it.

The test test/jdk/java/nio/channels/DatagramChannel/SendReceiveMaxSize.java as well as test/jdk/java/nio/channels/DatagramChannel/ChangingAddress.java still have this option as its removal was overlooked in the original issue. It can now be removed from both tests.

Kind regards,
Patrick


Progress

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

Issue

  • JDK-8276634: Remove usePlainDatagramSocketImpl option from the test DatagramChannel/SendReceiveMaxSize.java

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6252

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 4, 2021

👋 Welcome back pconcannon! 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 label Nov 4, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 4, 2021

@pconcannon The following label will be automatically applied to this pull request:

  • nio

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

@openjdk openjdk bot added the nio label Nov 4, 2021
dfuch
dfuch approved these changes Nov 4, 2021
Copy link
Member

@dfuch dfuch left a comment

Thanks for the cleanup Patrick!

@openjdk
Copy link

@openjdk openjdk bot commented Nov 4, 2021

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

8276634: Remove `usePlainDatagramSocketImpl` option from the test DatagramChannel/SendReceiveMaxSize.java

Reviewed-by: dfuchs, alanb, vtewari

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

  • 8e17ce0: 8275185: Remove dead code and clean up jvmstat LocalVmManager
  • 396132f: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds
  • 9ad4d3d: 8276025: Hotspot's libsvml.so may conflict with user dependency
  • e21b5c7: 8276650: GenGraphs does not produce deterministic output
  • 7b1916e: 8233557: [TESTBUG] DoubleClickTitleBarTest.java fails on macOs
  • 8ec80c4: 8276653: Missing row headers in j.l.Character docs
  • 7e87f94: 8276652: Missing row headers in MethodHandles.Lookup docs
  • dcf36f8: 8275670: ciReplay: java.lang.NoClassDefFoundError when trying to load java/lang/invoke/LambdaForm$MH
  • 81203ef: 8276655: Use blessed modifier order in SCTP
  • 2b5a32c: 8275718: Relax memory constraint on exception counter updates
  • ... and 11 more: https://git.openjdk.java.net/jdk/compare/ee499632586eabb3dab209645d5b9c781a09034b...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 label Nov 4, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 4, 2021

Webrevs

@msheppar
Copy link

@msheppar msheppar commented Nov 4, 2021

has the property been retained? If it still exists, then it would seem that the test scenarios are still valid.

@pconcannon
Copy link
Contributor Author

@pconcannon pconcannon commented Nov 4, 2021

has the property been retained? If it still exists, then it would seem that the test scenarios are still valid.

No, the property, along with the implementation it referred to, was removed in JDK-8253119. More details can be found in the related CSR: https://bugs.openjdk.java.net/browse/JDK-8269759

@dfuch
Copy link
Member

@dfuch dfuch commented Nov 4, 2021

has the property been retained? If it still exists, then it would seem that the test scenarios are still valid.

$ find src/java.base/ -type f | xargs grep usePlainDatagramSocketImpl | wc -l
       0

There's nothing in the code that reads or depends on that property. So retaining it in test doesn't make much sense IMO. In addition though test/jdk/java/nio/channels/DatagramChannel/ChangingAddress.java uses a mix of DatagramSocket and DatagramChannel, test/jdk/java/nio/channels/DatagramChannel/SendReceiveMaxSize.java only uses DatagramChannel which never depended on that property in the first place, so having additional @run in there was probably a copy-paste mistake.

@msheppar
Copy link

@msheppar msheppar commented Nov 4, 2021

yes, thanks for the clarification Daniel I hadn't read the release note
but, the release note says

Support for the system properties jdk.net.usePlainSocketImpl and jdk.net.usePlainDatagramSocketImpl, used to select these implementations, has also been removed. Setting these properties will now have no effect.

So that the fact that the test's have unintentionally remained, actually validates the release note

although arguable there has been a side effect, i.e. test failure not observed previously -- but that could be coincidental

even though these are DatagramChannel test, DatagramChannel does encapsulate (or contains) a DatagramSocket, so may not be altogether irrelevant ?

@dfuch
Copy link
Member

@dfuch dfuch commented Nov 4, 2021

even though these are DatagramChannel test, DatagramChannel does encapsulate (or contains) a DatagramSocket, so may not be altogether irrelevant ?

No it's the other way round DatagramSocket encapsulates a DatagramChannel.

The property was here to allow DatagramSocket to not encapsulate a DatagramChannel by default but revert to using the legacy DatagramSocketImpl implementation built in the JDK. And that impl has now been removed.

So the property never had any effect on the DatagramChannel implementation.

@msheppar
Copy link

@msheppar msheppar commented Nov 4, 2021

We might end up talking at cross purposes here!!
But, it is worth noting that DatagramChannel::socket returns a DatagramSocket and so DatagramChannel encapsulates a DatagramSocket. As such you'd anticipate that the property would have some influence over the DatagramSocket and its implementation. As of now the property is redundant, but the operational semantics should be the same as previously existed when the property was valid.

I understand your perspective, that with the updated restructuring of the DatagramSocket implementation and it delegation into DatagramChannel implementation there is a form of DatagramChannel implementation encapsulation.

@dfuch
Copy link
Member

@dfuch dfuch commented Nov 4, 2021

As such you'd anticipate that the property would have some influence over the DatagramSocket and its implementation

Well... No. That was never the case.

@pconcannon
Copy link
Contributor Author

@pconcannon pconcannon commented Nov 5, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Nov 5, 2021

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

  • 3c0faa7: 8276173: Clean up and remove unneeded casts in HeapDumper
  • 323d201: 8275506: Rename allocated_on_stack to allocated_on_stack_or_embedded
  • 96c396b: 8276151: AArch64: Incorrect result for double to int vector conversion
  • 7281861: 8272065: jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416
  • 8e17ce0: 8275185: Remove dead code and clean up jvmstat LocalVmManager
  • 396132f: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds
  • 9ad4d3d: 8276025: Hotspot's libsvml.so may conflict with user dependency
  • e21b5c7: 8276650: GenGraphs does not produce deterministic output
  • 7b1916e: 8233557: [TESTBUG] DoubleClickTitleBarTest.java fails on macOs
  • 8ec80c4: 8276653: Missing row headers in j.l.Character docs
  • ... and 15 more: https://git.openjdk.java.net/jdk/compare/ee499632586eabb3dab209645d5b9c781a09034b...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 5, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 5, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 5, 2021

@pconcannon Pushed as commit d95299a.

💡 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 nio
5 participants