RFR: 8293484: AArch64: TestUseSHA512IntrinsicsOptionOnSupportedCPU.java fails on CPU with SHA512 feature support
Hao Sun
haosun at openjdk.org
Wed Nov 5 03:36:01 UTC 2025
On Thu, 30 Oct 2025 07:09:38 GMT, Ramkumar Sunderbabu <rsunderbabu at openjdk.org> wrote:
> We have a host of tests under test/hotspot/jtreg/compiler/intrinsics/sha which checks if the SHA intrinsics flags' enable/disable setting is in sync with CPU support in the underlying platform. There might be situations where the intrinsics might not be enabled despite the hardware supporting the relevant instructions. For example, there might be reliability issues or performance issues. In such situations, the tests will fail.
>
> Till now, the approach has been to exclude the platforms where the support is yet to be provided and remove the exclusion after. This necessitates additional work on the test front.
>
> A more compact design would be make predicate probes to rely on intrinsics availability in the platform as opposed to hardware support availability. The migration to intrinsics availability would especially help update releases where feature backport might not be complete.
>
> PS: This fix can/should be propagated to other such tests as well. Once this PR gets approval, I will work on similar tests.
Hi, I suppose the failure may occur if we run this test case on CPU **with** SHA512 feature, but **disabling** SHA512Intrinsics.
As **@requires vm.flagless** is set in this jtreg case, if we specify `-XX:-UseSHA512Intrinsics`, this test case is not tested actually. Here shows the log in my machine.
$ make test TEST=test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java JTREG="VM_OPTIONS=-XX:-UseSHA512Intrinsics"
Building target 'test' in configuration '/tmp/local-build-fastdebug'
Running tests using JTREG control variable 'VM_OPTIONS=-XX:-UseSHA512Intrinsics'
Test selection 'test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java', will run:
* jtreg:test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java
Clean up dirs for jtreg_test_hotspot_jtreg_compiler_intrinsics_sha_cli_TestUseSHA512IntrinsicsOptionOnSupportedCPU_java
Running test 'jtreg:test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java'
Test results: no tests selected
Report written to /tmp/local-build-fastdebug/test-results/jtreg_test_hotspot_jtreg_compiler_intrinsics_sha_cli_TestUseSHA512IntrinsicsOptionOnSupportedCPU_java/html/report.html
Results written to /tmp/local-build-fastdebug/test-support/jtreg_test_hotspot_jtreg_compiler_intrinsics_sha_cli_TestUseSHA512IntrinsicsOptionOnSupportedCPU_java
Finished running test 'jtreg:test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java'
Test report is stored in /tmp/local-build-fastdebug/test-results/jtreg_test_hotspot_jtreg_compiler_intrinsics_sha_cli_TestUseSHA512IntrinsicsOptionOnSupportedCPU_java
==============================
Test summary
==============================
TEST TOTAL PASS FAIL ERROR SKIP
jtreg:test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java
0 0 0 0 0
==============================
TEST SUCCESS
If so, I don't think it's a bug.
Is there anything I misunderstood?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28053#issuecomment-3489100024
More information about the hotspot-compiler-dev
mailing list