Skip to content
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

Support Jcmd dump with default settings #8744

Merged
merged 1 commit into from
Mar 7, 2020

Conversation

JasonFengJ9
Copy link
Member

@JasonFengJ9 JasonFengJ9 commented Mar 4, 2020

Support Jcmd dump with default settings

DiagnosticUtils.triggerDumpsImpl() can generate dump files with default settings when the dump request doesn't have :file=name, modified the request string according to the incoming arguments.
Modified Jcmd help message;
Modified the test to adopt Jcmd without command argument;
Added a test for Jcmd with default settings;
Minor refactoring.

closes: #8721

Reviewer: @DanHeidinga
FYI: @pshipton

Signed-off-by: Jason Feng fengj@ca.ibm.com

@pshipton
Copy link
Member

pshipton commented Mar 4, 2020

@pshipton
Copy link
Member

pshipton commented Mar 4, 2020

jenkins compile zlinux jdk11

@pshipton
Copy link
Member

pshipton commented Mar 4, 2020

I tried the existing TestJcmd_0 test using a grinder, and it's failing.
https://ci.eclipse.org/openj9/view/Test/job/Grinder/644/

16:47:40  FAILED: testCommandNoOptions
16:47:40  java.lang.AssertionError: Expected string "Error: wrong number of arguments" not found expected [true] but found [false]
16:47:40  	at org.testng.Assert.fail(Assert.java:96)
16:47:40  	at org.testng.Assert.failNotEquals(Assert.java:776)
16:47:40  	at org.testng.Assert.assertTrue(Assert.java:44)
16:47:40  	at org.openj9.test.attachAPI.TestJcmd.testCommandNoOptions(TestJcmd.java:136)

@JasonFengJ9
Copy link
Member Author

It is an extended test, that's why it didn't show up in the personal builds.
Will address the test failure and add the new test for the dump file with default settings.

@JasonFengJ9
Copy link
Member Author

Modified/added the test, and passed locally.
Please review.

DiagnosticUtils.triggerDumpsImpl() can generate dump files with default
settings when the dump request doesn't have `:file=name`, modified the
request string according to the incoming arguments;
Modified Jcmd help message;
Modified the test to adopt Jcmd without command argument;
Added a test for Jcmd with default settings;
Minor refactoring.


Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@pshipton
Copy link
Member

pshipton commented Mar 6, 2020

jenkins test extended win,plinux jdk8,jdk11

@pshipton pshipton merged commit 03c0d48 into eclipse-openj9:master Mar 7, 2020
@pshipton
Copy link
Member

@JasonFengJ9 we should mention this change in the User Guide What's New. Pls create a docs Issue, and later a PR. The docs aren't open for 0.20.0 changes yet, but should be later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Allow default javacore file name for jcmd Dump.java
2 participants