-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8310355: Move the stub test from initialize_final_stubs() to test/hotspot/gtest #14765
Conversation
…spot/gtest 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.
👋 Welcome back haosun! A progress list of the required criteria for merging this PR into |
@@ -0,0 +1,153 @@ | |||
/* | |||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this file is copied from stubRoutines.cpp
, hence I continue to use the copyright year from stubRoutines.cpp
.
But I'm not 100% sure if it is correct. Please let me know if it is not. Thanks.
Ping? Can anyone help take a look at this patch? |
Changes look good to me. Thank you for doing this change. |
@shqking This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 117 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Going to push as commit 4b9ec82.
Your commit was automatically rebased without conflicts. |
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:
Remove
ASSERT
condition check, and the gtest case will be run for release build as well.Use the gtest helper
ASSERT_TRUE()
to replace theassert()
.Note that the downside is that we won't catch stub implementation errors immediately on startup.
Test:
Cross compilations on arm32/s390/ppc/riscv passed.
tier1 test passed on Linux/AArch64, Linux/x86_64 and macOS/Apple silicon. Note that hotspot/gtest is run in tier1.
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.
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.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14765/head:pull/14765
$ git checkout pull/14765
Update a local copy of the PR:
$ git checkout pull/14765
$ git pull https://git.openjdk.org/jdk.git pull/14765/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14765
View PR using the GUI difftool:
$ git pr show -t 14765
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14765.diff
Webrev
Link to Webrev Comment