RFR: 8267075: jcmd VM.cds should print directory of the output files

Calvin Cheung ccheung at openjdk.java.net
Wed Jun 23 20:43:35 UTC 2021


On Wed, 23 Jun 2021 18:11:47 GMT, Yumin Qi <minqi at openjdk.org> wrote:

> Hi, Please review the simple change for jcmd VM.cds to print directory of output file.
> The printout will print out absolute file path, also a test scenario added.
> 
> Tests: tier1,tier2,tier3,tier4
> 
> Thanks
> Yumin

Code changes look good. Just couple of comments in the test case.

test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestFileSafety.java line 48:

> 46: public class JCmdTestFileSafety extends JCmdTestDumpBase {
> 47:     static final String promtStdout = "please check stdout file";
> 48:     static final String promtStderr = "or stderr file";

Could you change the variable names to `promptStdout` and `promptStderr` instead?

Please also add the bug id to the `@bug`.

test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestFileSafety.java line 53:

> 51:        String stdText = output.getOutput();
> 52:        if (stdText.contains(promtStdout) &&
> 53:            stdText.contains(promtStderr)) {

What if either `promtStdout` or `promtStderr` is not found in stdout, should a RuntimeException be thrown as well?

-------------

PR: https://git.openjdk.java.net/jdk/pull/4576


More information about the hotspot-runtime-dev mailing list