JDK-8271707 : migrate tests to use jdk.test.whitebox.WhiteBox
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: test
  • Affected Version: 17,18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-08-03
  • Updated: 2022-07-20
  • Resolved: 2022-07-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 b06Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Relates :  
Description
JDK-8067223 deprecated sun.hotspot.WhiteBox and introduced jdk.test.whitebox.WhiteBox. this RFE is to adjust existing tests to use j.t.w.WB.
Comments
Changeset: e7795851 Author: Coleen Phillimore <coleenp@openjdk.org> Date: 2022-07-08 15:55:14 +0000 URL: https://git.openjdk.org/jdk/commit/e7795851d2e02389e63950fef939084b18ec4bfb
08-07-2022

If you use "sed -i -e ..." then it edits the file in place, so no need to create a new file and move it over. :)
08-07-2022

Good to know another 'sed' option. My sed script starts with a diff instead of mv on that line so I can double check what I'm doing. :)
08-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9417 Date: 2022-07-07 20:43:09 +0000
07-07-2022

I tried to change only the tests in runtime because I needed to add a WhiteBox call to ClassUnloadCommon.java but the fan out and indirect usages made it impossible to fix some of the cases without fixing all of them. The magic of sed and some fixups: # foreach f (`cat file.list`) sed -e "s|sun/hotspot/WhiteBox|jdk/test/whitebox/WhiteBox|" \ -e "s/sun.hotspot.WhiteBox/jdk.test.whitebox.WhiteBox/g" $f >$f.new mv $f.new $f end
07-07-2022