RFR(S): 8195809: [TESTBUG] jps and jcmd -l support for Docker containers is not tested
Leonid Mesnik
leonid.mesnik at oracle.com
Wed Jul 31 22:10:34 UTC 2019
Hi
Here are general comments about test design:
As I understand your docker process should work at least 20 sec *
TIME_FACTOR just to wait until SimpleLoop completed. It is wasting of
time. It is good for 1-2 tests but later it might makes sense to
improve driver/test process communications.
Also the common way to identify and find java process is to use unique
key as parameter.
You might want to improve the driver/test communication later.
See my comments:
http://cr.openjdk.java.net/~mseledtsov/8195809.00/test/hotspot/jtreg/containers/docker/TestJcmd.java.html
54 return;
I think you need to throw exception to signal that test is skipped.
http://cr.openjdk.java.net/~mseledtsov/8195809.00/test/hotspot/jtreg/containers/docker/SimpleLoop.java.html
34 for (int i=0; i < howLong; i++) {
The indentation is wrong.
http://cr.openjdk.java.net/~mseledtsov/8195809.00/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java.udiff.html
340 * @return True if container is running
Should be true, not True.
367 for(int i=0; i < count; i++) {
The indentation is wrong.
Otherwise fix looks good. However please get Review from anyone who is
expert in Docker.
Leonid
On 7/29/19 8:46 PM, mikhailo.seledtsov at oracle.com wrote:
> Please review this change that:
> - adds test case for "jcmd -l" and "jcmd <pid> help" where jcmd is
> executed on a host/node outside the container,
> while a targeted JVM is running inside a container
> - factors out some common functionality to DockerTestUtils and
> docker.Common
>
> Please note:
> - the "jcmd -l" works in this configuration, however the JCMD's and
> Target's username and UID have to match
> (per design)
> - the "jcmd help", "jcmd JFR.start" or any other JCMD command
> besides "jcmd -l" does not work in this configuration
> (Filed "JDK-8228343: JCMD and attach fail to work across Linux
> Container boundary")
> The test case is commented out, however can be used for
> reproducing the issue, and will be enabled
> once the bug is fixed.
>
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8195809
> Webrev: http://cr.openjdk.java.net/~mseledtsov/8195809.00/
> Testing:
> - ran the new test multiple times on Linux-x64
> - ran TestJCMDWithSideCar multiple times on Linux-x64
> - ran all Docker/Container tests (HotSpot and JDK)
> All PASS
>
> Thank you,
> Misha
>
More information about the hotspot-runtime-dev
mailing list