RFR (M): 8054278: Refactor jps utility tests

Staffan Larsen staffan.larsen at oracle.com
Thu Aug 14 12:10:58 UTC 2014


On 14 aug 2014, at 14:06, Jaroslav Bachorik <jaroslav.bachorik at oracle.com> wrote:

> On 08/14/2014 01:55 PM, Leonid Mesnik wrote:
>> Katya
>> 
>> I am not reviewing tests, just have small comment.
>> I think it would be better to use '@run driver' instead of '@run main'
> 
> Could you elaborate on this, please? In http://openjdk.java.net/jtreg/tag-spec.txt the "driver" action is not mentioned - what is its purpose and how it differs from "main”?

Specifying “@run driver” (instead of “@run main”) will launch the test with no vm arguments. Whatever arguments were specified in -vmoptions to jtreg will be available in the System property test.vm.opts and the test code can use those arguments when launching other processes. So it’s a way to write testing code that really just launches other VMs where the actual test is. See it as a replacement for writing shell scripts to do this.

/Staffan

> 
> Thanks,
> 
> -JB-
> 
>> in these tests.
>> 
>> Leonid
>> 
>> On 14.08.2014 15:40, Yekaterina Kantserova wrote:
>>> Hi,
>>> 
>>> Could I please have a review of this fix.
>>> 
>>> webrev:http://cr.openjdk.java.net/~ykantser/8054278/webrev.00/
>>> bug:https://bugs.openjdk.java.net/browse/JDK-8054278
>>> 
>>> As of today the test/jdk/sun/tools/jps tests are a number of shell and awk scripts that test only a few combinations of jps args. The tests also used to fail intermittently due to timing issues, e.g.JDK-7091195  <https://bugs.openjdk.java.net/browse/JDK-7091195>  andJDK-6542634  <https://bugs.openjdk.java.net/browse/JDK-6542634>. In order to make tests more stable and make sure all combinations of arguments are tested the test will be refactored using jdk.testlibrary functionality.
>>> 
>>> The tests have been run on all basic platforms.
>>> 
>>> Thanks,
>>> Katja
>> 
> 



More information about the serviceability-dev mailing list