RFR for JDK-7195249 Some jtreg tests use hard coded ports
yekaterina.kantserova at oracle.com
Thu Nov 7 07:14:11 PST 2013
see my comments in-lined.
On 11/06/2013 03:04 PM, taras ledkov wrote:
> Hi Everyone
> I am working on bug https://bugs.openjdk.java.net/browse/JDK-7195249.
> Based on my colleagues' research,
> Root cause:
> fails intermittently because of use of fixed ports. These ports could
> be busy at some configurations.
> Suggested fix:
> 1. My recommendation would be to convert the only shell test
> (SSLConfigFilePermissionTest.sh) into
> Java based test and re-use the dynamic port allocation
> to address the issue for JDK tests. Staffan Larsen recommends to use
> this solution instead of
> 2. For hotspot tests I cannot find appropriate test utils (witch
> provide getFreePort() functionality). There are several options:
> - copy whole library jdk/test/lib/testlibrary/jdk/testlibrary/ to
> hotspot repository;
There is already testlibrary in the hotspot part:
hotspot/test/testlibrary. The most classes from jdk/test/lib/testlibrary
are already in there (package com.oracle.java.testlibrary).
I've added Utils, TestThread, ProcessThread and XRun a while ago but has
not yet port them to the hotspot part.
> - copy one class jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java
> to hotspot repository;
Sounds like a good solution right now. I'll try to port the rest in the
> - copy one method from class
> (Utils.getFreePort()) to hotspot repository;
> - move the library jdk/test/lib/testlibrary/jdk/testlibrary/ to a
> place that can be shared between hotspot & jdk tests (if such place
Sounds like an even better solution but there is no such place as far as
I know. But discussions are ongoing on how it can be achieved.
> 3. SourceDebugExtension test uses jtreg tag @run with hard coded port
> in jvm options. The test must be converted to test with java based
> test launcher and test application (e.g. like the test
> Please let me know any comments or suggestions.
> Thank you
More information about the serviceability-dev