8367994: test/jdk/sun/security/pkcs11/Signature/ tests pass when they should skip#27367
8367994: test/jdk/sun/security/pkcs11/Signature/ tests pass when they should skip#27367myankelev wants to merge 7 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back myankelevich! A progress list of the required criteria for merging this PR into |
|
@myankelev This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 107 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
@myankelev The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
| /** | ||
| * @test id=new_alg | ||
| * @bug 8080462 8226651 8242332 | ||
| * @summary Generate a RSASSA-PSS signature and verify it using PKCS11 provider |
There was a problem hiding this comment.
Should we need comments why this test was splited to two tests.
There was a problem hiding this comment.
There is no support for sha3 in nss for now it seems, so this is why it's split. I'm not sure if this makes any difference if highlighted in the comment, but I can add in the next commit.
|
Honestly, I don't quite understand why there are 2 tests initializing |
|
|
||
| /** | ||
| * @test | ||
| * @test id=old_alg |
There was a problem hiding this comment.
For id's, "old_alg" and "new_alg" aren't very descriptive/useful. Maybe change them to "sha" and "sha3"?
There was a problem hiding this comment.
Done in the next commit
|
|
||
| /** | ||
| * @test | ||
| * @test id=old_alg |
There was a problem hiding this comment.
use more descriptive id names
There was a problem hiding this comment.
Done in the next commit
| @@ -58,6 +79,9 @@ public class SignatureTestPSS extends PKCS11Test { | |||
| private static boolean skipTest = true; | |||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
I'm not sure what you mean here. I think the best way would be to split the @test and test each algorithm separately. However this approach will take forever to execute, which is a dealbreaker.
I can add all the skips into one list and only then print out the skipped parameters, if this helps. However, given that the test is split into sha and sha3, all sha3 will be skipped for now. I'm not sure it would bring much more clarity in this case. What do you think?
There was a problem hiding this comment.
In my opinion, tests shouldn't have logic that runs some test cases and skips others. It creates uncertainty when trying to analyze test coverage. In this case, if a SkippedException is thrown, we don't know what -- if any -- algorithms were successfully tested unless we review the logs and that's an unnecessary burden. If NSS doesn't support the SHA3 algorithms, then we shouldn't try to test them. When we update the NSS library, we need to look at what's newly supported (or removed) and update tests accordingly.
| keySize, | ||
| hashAlg, | ||
| mgfHashAlg); | ||
| skipTest = true; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
There should be no skips in this test with nss, so I don't think this should be an issue here. Splitting this into different @test would be though, as it will increase the execution time significantly.
There was a problem hiding this comment.
This test should also be updated to maintain a list of skipped tests. Right now the skipTest logic is flawed and it won't be marked as skipped if last runTest resets it to false.
There was a problem hiding this comment.
@rhalade yes, I agree. Didn't notice this. Thanks for noticing
I was just keeping the previous logic that was present before and could be seen in the other files. |
| @@ -58,6 +79,9 @@ public class SignatureTestPSS extends PKCS11Test { | |||
| private static boolean skipTest = true; | |||
There was a problem hiding this comment.
In my opinion, tests shouldn't have logic that runs some test cases and skips others. It creates uncertainty when trying to analyze test coverage. In this case, if a SkippedException is thrown, we don't know what -- if any -- algorithms were successfully tested unless we review the logs and that's an unnecessary burden. If NSS doesn't support the SHA3 algorithms, then we shouldn't try to test them. When we update the NSS library, we need to look at what's newly supported (or removed) and update tests accordingly.
|
@myankelev This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a |
|
/touch |
|
@myankelev The pull request is being re-evaluated and the inactivity timeout has been reset. |
| hash, | ||
| mgfHash, | ||
| s); | ||
| skipTest = true; |
There was a problem hiding this comment.
I think skipTest logic in this test needs further updates. It starts with true as default value, should be false and only set skipTest to true when we encounter a test scenario that is not supported. I think there is also a case where skipTest value is overwritten at line 153 when called in a loop at line 95.
There was a problem hiding this comment.
Done in the next commit. I have reworked it to be a list for easier debug in the future.
| keySize, | ||
| hashAlg, | ||
| mgfHashAlg); | ||
| skipTest = true; |
There was a problem hiding this comment.
This test should also be updated to maintain a list of skipped tests. Right now the skipTest logic is flawed and it won't be marked as skipped if last runTest resets it to false.
|
/integrate |
|
Going to push as commit ef7532e.
Your commit was automatically rebased without conflicts. |
|
@myankelev Pushed as commit ef7532e. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27367/head:pull/27367$ git checkout pull/27367Update a local copy of the PR:
$ git checkout pull/27367$ git pull https://git.openjdk.org/jdk.git pull/27367/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27367View PR using the GUI difftool:
$ git pr show -t 27367Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27367.diff
Using Webrev
Link to Webrev Comment