|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
|
31 | 31 | import jdk.test.lib.cli.predicate.NotPredicate;
|
32 | 32 |
|
33 | 33 | /**
|
34 |
| - * Generic test case for SHA-related options targeted to AArch64 CPUs |
| 34 | + * Generic test case for SHA-related options targeted to CPUs |
35 | 35 | * which don't support instruction required by the tested option.
|
36 | 36 | */
|
37 |
| -public class GenericTestCaseForUnsupportedAArch64CPU extends |
| 37 | +public class GenericTestCaseForUnsupportedCPU extends |
38 | 38 | DigestOptionsBase.TestCase {
|
39 | 39 |
|
40 | 40 | final private boolean checkUseSHA;
|
41 | 41 |
|
42 |
| - public GenericTestCaseForUnsupportedAArch64CPU(String optionName) { |
| 42 | + public GenericTestCaseForUnsupportedCPU(String optionName) { |
43 | 43 | this(optionName, true);
|
44 | 44 | }
|
45 | 45 |
|
46 |
| - public GenericTestCaseForUnsupportedAArch64CPU(String optionName, boolean checkUseSHA) { |
47 |
| - super(optionName, new AndPredicate(Platform::isAArch64, |
| 46 | + public GenericTestCaseForUnsupportedCPU(String optionName, boolean checkUseSHA) { |
| 47 | + super(optionName, |
48 | 48 | new NotPredicate(DigestOptionsBase.getPredicateForOption(
|
49 |
| - optionName)))); |
| 49 | + optionName))); |
50 | 50 |
|
51 | 51 | this.checkUseSHA = checkUseSHA;
|
52 | 52 | }
|
@@ -95,15 +95,15 @@ protected void verifyOptionValues() throws Throwable {
|
95 | 95 | // using CLI options.
|
96 | 96 | CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
|
97 | 97 | String.format("Option '%s' should be off on unsupported "
|
98 |
| - + "AArch64CPU even if set to true directly", optionName), |
| 98 | + + "CPU even if set to true directly", optionName), |
99 | 99 | DigestOptionsBase.UNLOCK_DIAGNOSTIC_VM_OPTIONS,
|
100 | 100 | CommandLineOptionTest.prepareBooleanFlag(optionName, true));
|
101 | 101 |
|
102 | 102 | if (checkUseSHA) {
|
103 | 103 | // Verify that option is disabled when +UseSHA was passed to JVM.
|
104 | 104 | CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
|
105 | 105 | String.format("Option '%s' should be off on unsupported "
|
106 |
| - + "AArch64CPU even if %s flag set to JVM", |
| 106 | + + "CPU even if %s flag set to JVM", |
107 | 107 | optionName, CommandLineOptionTest.prepareBooleanFlag(
|
108 | 108 | DigestOptionsBase.USE_SHA_OPTION, true)),
|
109 | 109 | DigestOptionsBase.UNLOCK_DIAGNOSTIC_VM_OPTIONS,
|
|
0 commit comments