-
Notifications
You must be signed in to change notification settings - Fork 738
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
Add test utility methods to get attach API information #4639
Conversation
This is cleanup in preparation for anticipated new attach API tests arising from #2543. |
@pdbain-ibm the description doesn't seem to match the code. I thought this was going to be vm changes but it is all test changes. Is the change as intended? Also, I think we need an Issue that each PR can refer to, so all the attach and utility changes can be tied together. |
Please fix the commit title as well. |
The Issue I'm thinking of is for jps, jstack, etc. There should be a high level issue and every related PR should refer to it. |
b36c91b
to
5c56cd0
Compare
jenkins test all xlinux jdk8,jdk11 |
jenkins test all xlinux jdk11 |
jenkins test sanity xlinux jdk11 |
jenkins test extended xlinux jdk11 |
@pdbain-ibm while the changes themselves look fine, com.ibm.tools.attach.target.AttachHandler is still hard coded. I assume you are planning additional changes later that will cause this change to make sense? |
It would be clearer if that information was in the commit comment and description of this PR. |
Add methods to check for attach API initialization, get process ID, and get virtual machine ID. Use reflection to avoid compile-time dependency in test code on OpenJ9 internal classes Replace some existing references to AttachHandler in favour of the new methods. This is further to "Use reflection to access attach API internal APIs" eclipse-openj9#2962. This allows tests to remove references to attach API implementation classes and compile without requiring `--add-exports java.base/com.ibm.tools.attach.target`. This is preparation for tests of new features in eclipse-openj9#4655. [ci skip] Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
5c56cd0
to
ffcc1d9
Compare
Done. |
@smlambert lgtm |
I have merged this, however, jdk8/jdk11 grinders 276/278 eventually failed, am assuming missing native test libs, as I did not upload them to the job: org.openj9.test.attachAPI.TestAttachAPI.test_agntld02 [AttachApiTest] [ERROR] com.sun.tools.attach.AgentLoadException: ATTACH_ERR AgentLoadException jvmtitest: |
Add methods to check for attach API initialization, get process ID, and get
virtual machine ID.
Use reflection to avoid compile-time dependency on OpenJ9 internal classes by tests.
Replace some existing references to AttachHandler in favour of the new methods.
This is further to "Use reflection to access attach API internal APIs" #2962. This allows tests to remove references to attach API implementation classes and compile without requiring
--add-exports java.base/com.ibm.tools.attach.target
.This is cleanup in preparation for tests of new features in #4655.
Signed-off-by: Peter Bain peter_bain@ca.ibm.com