<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 10, 2023 at 2:23 AM David Holmes <<a href="mailto:dholmes@openjdk.org">dholmes@openjdk.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 9 Feb 2023 06:15:36 GMT, David Holmes <<a href="mailto:dholmes@openjdk.org" target="_blank">dholmes@openjdk.org</a>> wrote:<br>
<br>
>> Johan Sjölen has updated the pull request incrementally with four additional commits since the last revision:<br>
>> <br>
>> - Fix the test<br>
>> - Note man section<br>
>> - Add test<br>
>> - Reimplement malloc_info as requested<br>
><br>
> test/hotspot/jtreg/serviceability/dcmd/vm/MallocInfoTest.java line 43:<br>
> <br>
>> 41: public void run(CommandExecutor executor) {<br>
>> 42: OutputAnalyzer output = executor.execute("System.native_heap_info");<br>
>> 43: output.reportDiagnosticSummary();<br>
> <br>
> Do this after the other checks, else on error you will get the report twice.<br>
<br>
Just to clarify something in relation to a comment from @tstuefe that I now can't find. It can be useful to show the information even if the test passes, so that, for example, we can go and look at test results and see the kind of data that malloc_info is showing us. I often find myself adding this to tests because they swallow the interesting output even though the test passes (sometimes for the wrong reason!).<br></blockquote><div><br></div><div>Oh, certainly. But its even more useful the other way around, if the test fails. My concern was (and weirdly enough I cannot find my own comment now) that if you place reportDiagnosticSummary() after the shouldContain, you won't see anything but the "should match" error. I always place the reportDiagnosticSummary right at the beginning for that reason.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-------------<br>
<br>
PR: <a href="https://git.openjdk.org/jdk/pull/12455" rel="noreferrer" target="_blank">https://git.openjdk.org/jdk/pull/12455</a><br>
</blockquote></div></div>