RFR: 8231954: [TESTBUG] Test compiler/codegen/TestCharVect2.java only works with server VMs.

Igor Ignatyev igor.ignatyev at oracle.com
Tue Nov 12 19:40:46 UTC 2019


Hi Christoph,

we are trying to get rid of IgnoreUnrecognizedVMOptions in our tests, as in most cases, it causes wasted compute time (as in this test) and can also lead to wrong/deprecated/deleted flags sneaking into the testbase, so I'd like you to reconsider your decision. below are my comments on your concerns regarding @requires approach.


> but since  other tests like [1] and [2] are also using my suggested approach

I'm sorry but this is not an argument.

> how the flag MaxVectorSize plays together with the JVMCI
as '@requires vm.flavor == "server"' filters configurations based vm build type, it will still allow execution on JVM w/ JVMCI and when JVMCI compiler is selected, as it will still be Server VM build. so, in a sense, the test will be w/ JVMCI in the same way as w/ your approach.

> @requires tag would disable the test altogether, but the first run
this is the known limitation of jtreg/@requires, and our current way to workaround it is to split a test description based on @requires values, so in this case it will be:

> /**
>  * @test
>  * @bug 8001183
>  * @summary incorrect results of char vectors right shift operaiton
>  *
>  * @run main/othervm/timeout=400 -Xbatch -Xmx128m compiler.codegen.TestCharVect2
>  */
> /**
>  * @test
>  * @bug 8001183
>  * @summary incorrect results of char vectors right shift operaiton with different MaxVectorSize
>  *
>  * @comment only server VM has MaxVectorSize
>  * @requires MaxVectorSizevm.flavor == "server"
>  * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:+IgnoreUnrecognizedVMOptions -XX:MaxVectorSize=8 compiler.codegen.TestCharVect2
>  * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:+IgnoreUnrecognizedVMOptions -XX:MaxVectorSize=16 compiler.codegen.TestCharVect2
>  * @run main/othervm/timeout=400 -Xbatch -Xmx128m -XX:+IgnoreUnrecognizedVMOptions -XX:MaxVectorSize=32 compiler.codegen.TestCharVect2
>  */


Thanks,
-- Igor
 

> On Nov 12, 2019, at 4:07 AM, christoph.goettschkes at microdoc.com wrote:
> 
> Hi,
> 
> The test "compiler/codegen/TestCharVect2.java" uses the VM flag 
> "MaxVectorSize" which is not defined for all supported VM configurations. 
> Client VMs exit with an "Unrecognized VM option" error.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8231954
> Webrev: https://cr.openjdk.java.net/~bulasevich/8231954/webrev.00
> 
> Igor suggested to use the tag '@requires vm.flavor == "server"', but since 
> other tests like [1] and [2] are also using my suggested approach, and I 
> am uncertain how the flag MaxVectorSize plays together with the JVMCI, I 
> would currently stick with my approach and would like to get more feedback 
> on this topic. Also, the @requires tag would disable the test altogether, 
> but the first run (without the MaxVectorSize option) works in client VMs 
> and might be a viable test case, which is lost if the tag is added.
> 
> Thanks,
> Christoph
> 
> [1] 
> https://hg.openjdk.java.net/jdk/jdk/file/4dbdb7a8fa75/test/hotspot/jtreg/compiler/vectorization/TestNaNVector.java
> [2] 
> https://hg.openjdk.java.net/jdk/jdk/file/4dbdb7a8fa75/test/hotspot/jtreg/compiler/vectorization/TestPopCountVector.java
> 



More information about the hotspot-compiler-dev mailing list