RFR: 8160088: update hotspot tests depending on GC to use @requires vm.gc.X

David Holmes david.holmes at oracle.com
Thu Jun 23 00:17:09 UTC 2016


Hi Dmitry,

On 23/06/2016 4:06 AM, Dmitry Fazunenko wrote:
> Hello,
>
> I'm looking for Reviewers for relatively simple fix which affects 59 tests.
>   https://bugs.openjdk.java.net/browse/JDK-8160088
>   http://cr.openjdk.java.net/~dfazunen/8160088/webrev.00/
>
> The fix allows to skip execution of tests requiring a specific GC in
> case of the required GC is not supported by VM.
> Old variant:
>   @requires vm.gc == null | vm.gc == "G1"
>      A test will be executed if no GC is specified externally or
> -XX:+UseG1GC flag is given.
>      This test will be executed even if VM doesn't support G1 and fail.
> New variant:
>   @requires vm.gc.G1
>      This test will not be executed if VM doesn't support G1.

That doesn't seem sufficient. What you want is that if the test requires 
G1 then it also supports G1, so it seems to me the correct formulation is:

@requires (vm.gc == null |   // null -> default -> g1 (usually)
            vm.gc == G1 ) &
            vm.gc.G1

Aside: how does jtreg determine which GC's are supported?

Thanks,
David

> Testing:
> 1) starting jtreg with various collectors with "-c"  option to verify
> correctness of test descriptions.
>     Number of selected tests before and after change is the same:
> -XX:+UseG1GC:  1,456
> -XX:+UseSerialGC: 1,366
> -XX:+UseParallelGC: 1,369
> -XX:+UseConcMarkSweepGC: 1,368
> Default:  1,483; error
>
> 2) RBT (in progress)
>
> 3) Diff is analyzed manually (only necessary lines are affected):
> #> hg diff |grep "^- " |sort -u
> - * @requires (vm.gc == "G1" | vm.gc == "null")
> - * @requires (vm.gc=="G1" | vm.gc=="null")
> - * @requires vm.gc == "G1" | vm.gc == "null"
> - * @requires vm.gc=="ConcMarkSweep" | vm.gc == "null"
> - * @requires vm.gc=="ConcMarkSweep" | vm.gc=="null"
> - * @requires vm.gc=="G1" | vm.gc =="null"
> - * @requires vm.gc=="G1" | vm.gc=="null"
> - * @requires vm.gc=="Parallel" | vm.gc=="null"
> - * @requires vm.gc=="Serial" | vm.gc=="null"
> - * @requires vm.gc=="null" | vm.gc=="G1"
> - * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights
> reserved.
> - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights
> reserved.
> - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights
> reserved.
> - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
> #> hg diff |grep "^+ " |sort -u
> + * @requires vm.gc.ConcMarkSweep
> + * @requires vm.gc.G1
> + * @requires vm.gc.Parallel
> + * @requires vm.gc.Serial
> + * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights
> reserved.
> + * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights
> reserved.
> + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights
> reserved.
>
> Thanks,
> Dima


More information about the hotspot-dev mailing list