RFR: 8313206: PKCS11 tests silently skip execution [v3]

Sibabrata Sahoo ssahoo at openjdk.org
Thu Aug 3 09:57:31 UTC 2023


On Wed, 2 Aug 2023 22:27:05 GMT, Rajan Halade <rhalade at openjdk.org> wrote:

>> I have updated PKCS11Test.java to mark test as skipped only when all testDefault, testNSS, and testDeimos tests are skipped. This file also includes new trace messages, code cleanup and format change. Some other test files are updated to mark as skipped as they use TestNG framework to execute.
>> 
>> Enhancement [JDK-8313575](https://bugs.openjdk.org/browse/JDK-8313575) is filed to consider refractor of tests to split these for us to better track the coverage.
>
> Rajan Halade has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8313206: revert skipTest update to address with new bug

test/jdk/sun/security/pkcs11/PKCS11Test.java line 973:

> 971:         return r;
> 972:     }
> 973: 

I am not sure if 'NO_DEFAULT' expected to be true in setCommonSystemProps() Line:977 or it need to be explicitly reset by each Test where testDefault() expected to be executed,
System.setProperty("NO_DEFAULT", "true"); 

If it is supposed to be true then the testDefault() will always get skipped with the following condition,
Line:270-273 is will return before proceeding to test the default provider,
if ("true".equals(System.getProperty("NO_DEFAULT"))) {
             System.out.println("Skip default provider as test configured with NO_DEFAULT");
             return;
}

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15125#discussion_r1282942139



More information about the security-dev mailing list