RFR:8153989:Some SVC tests fail on compact2 due to an unnecessary test library dependency
Alexander Kulyakhtin
alexander.kulyakhtin at oracle.com
Wed Apr 20 16:06:53 UTC 2016
Hi,
Could you, please, review this small tests-only fix:
CR: https://bugs.openjdk.java.net/browse/JDK-8153992 "Some SVC tests fail on compact2 due to an unnecessary test library dependency"
Webrev: http://cr.openjdk.java.net/~akulyakh/8153992/test/testlibrary/jdk/test/lib/ProcessTools.java.udiff.html
Before the fix the ProcessTools.getProcessId() used the ManagementFactory.getRuntimeMXBean() API.
The API is not available on compact2 and below. Therefore the tests failed.
We are changing the ProcessTools.getProcessId() method to use the JDK 9 Process.getPid(). This eliminates the unnecessary dependency making the tests pass on compact2.
I am not sure how acceptable it is to cast from long to int this change. If it is not acceptable we can change the return type to long.
This however, will cause massive changes throughout the hotspot tests which presently expect getProcessId() to return int.
Best regards,
Alexander
More information about the serviceability-dev
mailing list