RFR (S): 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Mon Jan 5 11:48:47 UTC 2015


I fixed it as proposed.

I also assured the right exception is thrown, if I change the check for
the exit value to check for '1' (so that I get a test error), I now get:
  java.lang.RuntimeException: Expected to get exit value of [1]
while before, it would have said the wrong message:
   java.lang.RuntimeException: 'Unrecognized option: -client' missing from stdout/stderr

Best regards,

-----Original Message-----
From: Jesper Wilhelmsson [mailto:jesper.wilhelmsson at oracle.com] 
Sent: Montag, 5. Januar 2015 11:03
To: Lindenmaier, Goetz; 'hotspot-dev at openjdk.java.net'
Subject: Re: RFR (S): 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java


It seems your change introduces dead code:

+        if (output.shouldContain("Unrecognized option: -client") == null) {
+            throw e;
+        }

If the string is found shouldContain will return a reference to 'output' (!= 
null), and if the string is not found it will throw an exception, so the 
introduced throw will never happen, right?

This means the original exception 'e' is lost and a different one is thrown if 
-client was accepted by the VM.


Lindenmaier, Goetz skrev den 5/1/15 10:38:
> Just a little reminder ... this is really small!
> From: Lindenmaier, Goetz
> Sent: Montag, 22. Dezember 2014 14:08
> To: 'hotspot-dev at openjdk.java.net'
> Subject: RFR (S): 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java
> Hi,
> I please need a review and a sponsor for this tiny change:
> http://cr.openjdk.java.net/~goetz/webrevs/8068026-jtregClient/webrev.01/
> The test did not check whether -client is supported.
> The patch should also go to 8u60, please.
> Best regards,
>    Goetz

More information about the hotspot-dev mailing list