Backport vmTestbase tests to jdk8u-dev?
Liu, Xin
xxinliu at amazon.com
Wed Aug 28 17:03:47 UTC 2019
Hi,
Internally at Amazon, we’ve backported vmTestbase from jdk13 (as of 3 months ago) to corretto-8.
Even though more tests can be enabled, we currently run only the following tests in our nightly job of fastdebug. We treat them as complement tests.
TEST STATS: name=hotspot_vmtest_mlvm run=47 pass=47 fail=0
TEST STATS: name=hotspot_vmtest_jit run=224 pass=224 fail=0
TEST STATS: name=hotspot_vmtest_gc run=1 pass=1 fail=0
TEST STATS: name=hotspot_vmtest_runtime run=266 pass=266 fail=0
We wonder if the community is interested in vmTestbase in jdk8u. If yes, we can create a JBS issue to talk about how to upstream it.
It’s not a clean backport. Here’s the rationale for our changes. Opinions welcome. We will work on the mercurial repo and refactor it after discussion.
1. Path locations
We did a clean copy from jdk13/test/hotspot/jtreg/vmTestbase to jdk8u/hotspot/test/vmTestbase. We think it’s a good idea to use the jdk8u test layout.
2. Support @library /test/lib
Many vmTestbase tests depend on additional testing library. We’ve backported from jdk13 and placed it in “hotspot/test/test/lib/jdk/”. Elegance is not our primary consideration. We want to keep vmTestbase as intact as possible. Because vmTestbase is still in active development in upstream, this eases backporting. If we change /test/lib somewhere else, a global change of @library has to be made. Maintainers couldn’t directly apply future backport patches anymore.
A jumbo change include both 1 and 2.
https://github.com/navyxliu/corretto-8/commit/8aad9bdc2659660267e5a102cd625164552c79ee
3. Native compilation for tests
Some vmtestbase tests rely on native libraries, but jdk8u doesn’t support native compilation for tests. We added this function to hotspot build logic.
https://github.com/navyxliu/corretto-8/commit/f7beb63f4f4dfa31bd0854f228b266a49eefefed
4. Java option changed
Logging format changed, so we have to change from `-Xlog:gc:gc.log` to `-Xloggc:gc.log` globally. Another example is force vmTestbase skip -XX-CompactString.
https://github.com/navyxliu/corretto-8/commit/35fb47e0bfbd3fc95c58f13356624b8b18f908c1
5. Some code changes because of API changes
Unsafe, Process, Stream etc.
By putting above changes together, we can run vmTestbase in jdk8u.
# kick off nightly tests
make test-native
echo "****hotspot_vmtest_mlvm***"
(cd /src/hotspot/test; make JT_HOME=/opt/jtreg PRODUCT_HOME=/build/images/j2sdk-image/ ALT_OUTPUTDIR=/build hotspot_vmtest_mlvm)
echo "****hotspot_vmtest_jit***"
(cd /src/hotspot/test; make JT_HOME=/opt/jtreg PRODUCT_HOME=/build/images/j2sdk-image/ ALT_OUTPUTDIR=/build hotspot_vmtest_jit)
echo "****hotspot_vmtest_gc***"
(cd /src/hotspot/test; make JT_HOME=/opt/jtreg PRODUCT_HOME=/build/images/j2sdk-image/ ALT_OUTPUTDIR=/build hotspot_vmtest_gc)
echo "****hotspot_vmtest_runtime***"
(cd /src/hotspot/test; make JT_HOME=/opt/jtreg PRODUCT_HOME=/build/images/j2sdk-image/ ALT_OUTPUTDIR=/build hotspot_vmtest_runtime)
6. Once we’ve backported from jdk13, we can keep up with jdk tip by either backporting individual changes as they occur, or by doing one big backport when jdk14 is done.
Thanks,
--lx
More information about the jdk8u-dev
mailing list