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

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Tue Jan 20 12:53:50 UTC 2015


Hi Thomas,

yes, it would be better if the jtreg framework could sort it out right away.
But in this case, you would get two very similar tests, one of which 
would be executed always, thus not saving anything.  Except for having
to adapt two tests if there is a change needed.

Also, it's been pushed in the meantime.
http://hg.openjdk.java.net/jdk9/hs-gc/hotspot/rev/8dfd8b00c7f1

Should I still improve the test?

Thanks,
  Goetz.
  

-----Original Message-----
From: Thomas Schatzl [mailto:thomas.schatzl at oracle.com] 
Sent: Dienstag, 20. Januar 2015 13:45
To: Lindenmaier, Goetz
Cc: 'hotspot-dev at openjdk.java.net'
Subject: Re: RFR (S): 8068026: [TESTBUG] Check for -client in gc/g1/TestHumongousCodeCacheRoots.java

Hi Goetz,

On Mon, 2014-12-22 at 13:07 +0000, Lindenmaier, Goetz wrote:
> 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.

  I think it would be cleaner to split the test into two tests, each
@require'ing the particular vm flavor. And having a @run tag using
-client/-server respectively.

E.g.

// client test:
@...
@requires vm.flavor == client
@run main -client TestHumongousCodeCacheRootsClient

class TestHumongousCodeCacheRootsClient {
  public static void main(String[] args) {
    TestHumongousCodeCacheRootsHelper.main(args); // put into an
auxiliary class file...
  }
}

// server test:
@...
@requires vm.flavor == client
@run main -client TestHumongousCodeCacheRootsServer

class TestHumongousCodeCacheRootsServer {
  public static void main(String[] args) {
    TestHumongousCodeCacheRootsHelper.main(args); // put into an
auxiliary class file...
  }
}

That *could* work, and avoid the dodgy exception catching.

Thanks,
  Thomas




More information about the hotspot-dev mailing list