RFR: 8367994: test/jdk/sun/security/pkcs11/Signature/ tests pass when they should skip
Matthew Donovan
mdonovan at openjdk.org
Tue Sep 23 15:15:20 UTC 2025
On Thu, 18 Sep 2025 14:56:13 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:
> * test/jdk/sun/security/pkcs11/Signature/InitAgainPSS.java
> * test/jdk/sun/security/pkcs11/Signature/KeyAndParamCheckForPSS.java
> * test/jdk/sun/security/pkcs11/Signature/SigInteropPSS.java
> * test/jdk/sun/security/pkcs11/Signature/SigInteropPSS2.java
> * test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS.java
> * test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS2.java
> * test/jdk/sun/security/pkcs11/Signature/TestDSA.java
test/jdk/sun/security/pkcs11/Signature/KeyAndParamCheckForPSS.java line 98:
> 96: hashAlg,
> 97: mgfHashAlg);
> 98: skipTest = true;
should this test also be split into separate @test blocks? There are about 18 test cases and 17 of them could pass and the last one skipped and the test gets marked as skipped.
test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS.java line 38:
> 36:
> 37: /**
> 38: * @test id=old_alg
For id's, "old_alg" and "new_alg" aren't very descriptive/useful. Maybe change them to "sha" and "sha3"?
test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS.java line 79:
> 77: private static final int UPDATE_TIMES_HUNDRED = 100;
> 78:
> 79: private static boolean skipTest = true;
It looks like this field is still being and we might test some algorithms but the still throw a SkippedException. Can you get rid of this uncertainty somehow?
test/jdk/sun/security/pkcs11/Signature/SignatureTestPSS2.java line 39:
> 37:
> 38: /**
> 39: * @test id=old_alg
use more descriptive id names
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27367#discussion_r2372663754
PR Review Comment: https://git.openjdk.org/jdk/pull/27367#discussion_r2372622197
PR Review Comment: https://git.openjdk.org/jdk/pull/27367#discussion_r2372626034
PR Review Comment: https://git.openjdk.org/jdk/pull/27367#discussion_r2372624291
More information about the security-dev
mailing list