[jdk8u-dev] RFR: 8305329: [8u] Unify test libraries into single test library - step 1 [v2]

Zdenek Zambersky zzambers at openjdk.org
Tue Aug 15 13:32:02 UTC 2023


> I would like to start effort to unify test libraries in openjdk 8 into one unified library. This is first step of that effort, which moves newest copy of jdk test library (added with jfr backport) from `jdk/test/lib` to `test/lib`. For more details please continue reading. 
> 
> **Problem:**
> Test libraries in jdk8 are a bit messy.
> There are currently 3 different test libraries:
> - hotspot testlibrary - placed in [hotspot/test/testlibrary](https://github.com/openjdk/jdk8u-dev/tree/89aeae16e85ddfbd581cb86d0b0480b1e2d50e99/hotspot/test/testlibrary), (pkgs `com.oracle.java.testlibrary`, `sun.hotspot...` ), includes testlibrary tests in [hotspot/test/testlibrary_tests](https://github.com/openjdk/jdk8u-dev/tree/89aeae16e85ddfbd581cb86d0b0480b1e2d50e99/hotspot/test/testlibrary_tests)
> - jdk testlibrary (old) - placed in [jdk/test/lib/testlibrary](https://github.com/openjdk/jdk8u-dev/tree/master/jdk/test/lib/testlibrary), (pkgs `jdk.testlibrary`, `com.oracle.testlibrary.jsr292`)
> - jdk test lib - placed directly in [jdk/test/lib](https://github.com/openjdk/jdk8u-dev/tree/master/jdk/test/lib), was added with [jfr backport](https://github.com/openjdk/jdk8u-dev/commit/df7e09043392d5952d522a28702c6e5ec3e8492e), (pkgs `jdk.test.lib` `sun.hotspot...`)
> 
> Many test library classes exist in multiple different copies (using different pkgs). Few examples:
> - Platform.java - 3 copies ([hs](https://github.com/openjdk/jdk8u-dev/blob/89aeae16e85ddfbd581cb86d0b0480b1e2d50e99/hotspot/test/testlibrary/com/oracle/java/testlibrary/Platform.java), [jdk (old)](https://github.com/openjdk/jdk8u-dev/blob/master/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java), [jdk (jfr)](https://github.com/openjdk/jdk8u-dev/blob/master/jdk/test/lib/jdk/test/lib/Platform.java))
> - OutputAnalyzer.java - 3 copies ([hs](https://github.com/openjdk/jdk8u-dev/blob/89aeae16e85ddfbd581cb86d0b0480b1e2d50e99/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java), [jdk (old)](https://github.com/openjdk/jdk8u-dev/blob/master/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java), [jdk (jfr)](https://github.com/openjdk/jdk8u-dev/blob/master/jdk/test/lib/jdk/test/lib/process/OutputAnalyzer.java))
> - WhiteBox.java - 2 copies ([hotspot](https://github.com/openjdk/jdk8u-dev/blob/89aeae16e85ddfbd581cb86d0b0480b1e2d50e99/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java), [jdk (jfr)](https://github.com/openjdk/jdk8u-dev/blob/master/jdk/test/lib/sun/hotspot/WhiteBox.java))
> 
> Few additional obse...

Zdenek Zambersky has updated the pull request incrementally with one additional commit since the last revision:

  Removed lib classes, which do not compile on JDK8

-------------

Changes:
  - all: https://git.openjdk.org/jdk8u-dev/pull/294/files
  - new: https://git.openjdk.org/jdk8u-dev/pull/294/files/affb1253..14666aa2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=294&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=294&range=00-01

  Stats: 1437 lines in 8 files changed: 0 ins; 1437 del; 0 mod
  Patch: https://git.openjdk.org/jdk8u-dev/pull/294.diff
  Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/294/head:pull/294

PR: https://git.openjdk.org/jdk8u-dev/pull/294


More information about the jdk8u-dev mailing list