[jdk8u-dev] RFR: 8305329: [8u] Unify test libraries into single test library - step 1
Andrew John Hughes
andrew at openjdk.org
Sat Aug 12 13:11:59 UTC 2023
On Thu, 30 Mar 2023 21:12:59 GMT, Zdenek Zambersky <zzambers at openjdk.org> wrote:
> 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...
I think we should also probably have a step 4 to actually move the tests. That will then solve the backporting problem where tests keep being introduced in the wrong location.
-------------
PR Comment: https://git.openjdk.org/jdk8u-dev/pull/294#issuecomment-1675899040
More information about the jdk8u-dev
mailing list