Integrated: 8310355: Move the stub test from initialize_final_stubs() to test/hotspot/gtest
Hao Sun
haosun at openjdk.org
Tue Jul 18 06:02:21 UTC 2023
On Tue, 4 Jul 2023 04:45:31 GMT, Hao Sun <haosun at openjdk.org> wrote:
> Three groups of runtime routines, i.e. arraycopy, copy and fill, are tested inside function `initialize_final_stubs()`. The test runs every time the debug VM is started.
>
> I think it's a usual convention that it's better not to run functional tests on startup. Hence, this patch proposes to move the stub test under `test/hotspot/gtest`.
>
> It's one copy-paste patch, except the following two minor changes:
>
> 1) Remove `ASSERT` condition check, and the gtest case will be run for release build as well.
>
> 2) Use the gtest helper `ASSERT_TRUE()` to replace the `assert()`.
>
> Note that the downside is that we won't catch stub implementation errors immediately on startup.
>
> Test:
>
> 1) Cross compilations on arm32/s390/ppc/riscv passed.
>
> 2) tier1 test passed on Linux/AArch64, Linux/x86_64 and macOS/Apple silicon. Note that hotspot/gtest is run in tier1.
>
> 3) VM builds with several different options (e.g., zero build, release build, fastdebug build, client variant, no C1/c2) passed on Linux/AArch64 and Linux/x86_64.
>
> 4) I manually injected errors in arraycopy/copy/fill stubs and verified `make test TEST="gtest:StubRoutines"` fails or not. But this check only worked for array fill stub. For the remaining two stubs, VM build (`make images`) failed firstly before running the gtest, because the built VM with these "erroneous" stubs were executed to do something such as loading Java core library code.
This pull request has now been integrated.
Changeset: 4b9ec824
Author: Hao Sun <haosun at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4b9ec8245187a2eaccc711a6e5d3d4915dd022c9
Stats: 272 lines in 2 files changed: 153 ins; 119 del; 0 mod
8310355: Move the stub test from initialize_final_stubs() to test/hotspot/gtest
Reviewed-by: mseledtsov, lmesnik
-------------
PR: https://git.openjdk.org/jdk/pull/14765
More information about the hotspot-dev
mailing list