RFR: 8266401: mark hotspot compiler/intrinsics/sha/cli tests which ignore VM flags
Jie Fu
jiefu at openjdk.java.net
Sat May 1 16:46:49 UTC 2021
On Sat, 1 May 2021 15:01:44 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:
> if these tests ignore external flags, how do they fail w/ `-XX:UseAVX={0,1}`?
Well, yes and no.
These tests will first start a main test process, which won't ignore external flags.
Then the main test process will create new sub-test processes, which do ignore external flags.
For example, if we run TestUseSHA256IntrinsicsOptionOnUnsupportedCPU.java with UseAVX=1 on an Intel CPU, then
1) The main test process will say SHA256_INSTRUCTION is not supported [1] since -XX:UseAVX=1, and then calls GenericTestCaseForUnsupportedX86CPU [2].
2) Then a new sub-test process will be created in GenericTestCaseForUnsupportedX86CPU which expects UseSHA256Intrinsics to be false.
3) But the sub-test process will see UseSHA256Intrinsics is actually true since it ignores external flags.
4) Finally, the test fails.
So these tests do ignore external flags in all the sub-test processes.
And the tests may fail since the main test processes still accepts external flags, which is unexpected.
It would be better to mark them as vm.flagless to reduce testing noise.
Thnaks.
[1] https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java#L85
[2] https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnUnsupportedCPU.java#L49
-------------
PR: https://git.openjdk.java.net/jdk/pull/3829
More information about the hotspot-compiler-dev
mailing list