RFR(M): 8044186 Introduce a reproducible random generator

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Oct 30 19:49:33 UTC 2014


What is the difference between 'run main' and 'run driver'? I never saw 
'driver' before:

- * @run main RandomGeneratorTest same
- * @run main RandomGeneratorTest noseed
- * @run main RandomGeneratorTest different
+ * @run driver RandomGeneratorTest SAME_SEED
+ * @run driver RandomGeneratorTest NO_SEED
+ * @run driver RandomGeneratorTest DIFFERENT_SEED

Will it prevent running 6 different process (3 + 3 forked)?
I am concern for test's execution run on, say, SPARC with big memory and 
a lot of threads.

Yes, code looks good and relatively compact but consider test's 
execution time too.

Thanks,
Vladimir

On 10/30/14 4:57 AM, Sergei Kovalev wrote:
> Hi Vladimir,
>
> Would you like to see webrev or diff would be enough? Just in case diff
> is ok, I'm attaching it. If you'd like published webrev, please let me
> know.
>
> On 29.10.2014 20:49, Vladimir Kozlov wrote:
>> Hi Sergei,
>>
>> Please create webrev of differences between last webrev.03, which we
>> reviewed, and new webrev.00.
>>
>> Thanks,
>> Vladimir
>>
>> On 10/29/14 2:02 AM, Sergei Kovalev wrote:
>>> Hello team.
>>>
>>> Next round of review:
>>>
>>> http://cr.openjdk.java.net/~iignatyev/skovalev/8044186/webrev.00/
>>>
>>> Main changes:
>>> - introduced new test that testing new testlibrary functionality:
>>> test/testlibrary_tests/RandomGeneratorTest.java
>>> - slightly improved Utility.java in part of SEED variable access.
>>>
>>> All affected tests passed locally on Linux host.
>>>
>>> On 24.09.2014 22:36, Igor Veresov wrote:
>>>> Looks good.
>>>>
>>>> igor
>>>>
>>>> On Sep 24, 2014, at 7:21 AM, Sergei Kovalev
>>>> <sergei.kovalev at oracle.com> wrote:
>>>>
>>>>> Update:
>>>>> http://cr.openjdk.java.net/~vlivanov/kovalev/8044186/webrev.03/
>>>>>
>>>>> Added new testcase test/testlibrary_tests/RandomGeneratorTest.java
>>>>> that verify correctness of work for Utils.getRandomInstance() method.
>>>>>
>>>>> On 24.09.2014 13:09, Sergei Kovalev wrote:
>>>>>> Update:
>>>>>> http://cr.openjdk.java.net/~vlivanov/kovalev/8044186/webrev.02/
>>>>>>
>>>>>> Added new test.
>>>>>> Fixed misprint.
>>>>>>
>>>>>> On 24.09.2014 12:50, Vladimir Ivanov wrote:
>>>>>>> Sergei,
>>>>>>>
>>>>>>> Please, update recently introduced
>>>>>>> test/compiler/unsafe/UnsafeRaw.java.
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Vladimir Ivanov
>>>>>>>
>>>>>>> On 9/23/14, 7:04 PM, Sergei Kovalev wrote:
>>>>>>>> Hello all,
>>>>>>>>
>>>>>>>> Looking for volunteers for review.
>>>>>>>>
>>>>>>>> I'm working for CR
>>>>>>>> https://bugs.openjdk.java.net/browse/JDK-8044186 that
>>>>>>>> submitted against tests.
>>>>>>>>
>>>>>>>> There's the several tests which use randomly generated numbers.
>>>>>>>> It's
>>>>>>>> needed to introduce a way that provide a common manner to
>>>>>>>> reproduce the
>>>>>>>> same random sequence, set seed.
>>>>>>>>
>>>>>>>> There are two possible way to provide seed value:
>>>>>>>> - system property
>>>>>>>> - command line arguments.
>>>>>>>>
>>>>>>>> I chose system property to provide seed value because it could be
>>>>>>>> obtained in any part of code without additional effort. In case
>>>>>>>> passing
>>>>>>>> seed value as command line argument we have to introduce additional
>>>>>>>> logic (and unwanted code) to pass this value in appropriate method.
>>>>>>>>
>>>>>>>> I introduced factory method getRandomInstance in the file
>>>>>>>> Utility.java
>>>>>>>> and make reference to this method in all applicable tests.
>>>>>>>> There is other utility class: Verifier.java. It used in several
>>>>>>>> other
>>>>>>>> testcases from test/compiler/intrinsics/mathexact/ package.
>>>>>>>> Therefore
>>>>>>>> many files contains modifications only for jtreg annotations.
>>>>>>>>
>>>>>>>> I've tested all related tests locally. All tests passed and seed
>>>>>>>> value
>>>>>>>> printed to the logs.
>>>>>>>>
>>>>>>>> links:
>>>>>>>> bug: https://bugs.openjdk.java.net/browse/JDK-8044186
>>>>>>>> webrev:
>>>>>>>> http://cr.openjdk.java.net/~vlivanov/kovalev/8044186/webrev.01/
>>>>>>>>
>>>>>>>
>>>>> --
>>>>> With best regards,
>>>>> Sergei
>>>>>
>>>>
>>>>
>>>
>>
>>
>


More information about the hotspot-compiler-dev mailing list