RFR: 8266182: Automate manual steps listed in the test jdk/sun/security/pkcs12/ParamsTest.java [v4]

Abdul Kolarkunnu akolarkunnu at openjdk.java.net
Fri Aug 13 10:04:33 UTC 2021


On Mon, 9 Aug 2021 12:54:40 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Abdul Kolarkunnu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8266182: Automate manual steps listed in the test jdk/sun/security/pkcs12/ParamsTest.java
>
> test/jdk/sun/security/pkcs12/KeytoolOpensslInteropTest.java line 48:
> 
>> 46: import java.nio.file.Files;
>> 47: import java.nio.file.Path;
>> 48: import java.nio.file.Paths;
> 
> IntelliJ IDEA shows quite some imports are useless.

Removed all unused imports

> test/jdk/sun/security/pkcs12/KeytoolOpensslInteropTest.java line 100:
> 
>> 98:         OutputAnalyzer output = ProcessTools.executeCommand(
>> 99:                 opensslPath, "version")
>> 100:                 .shouldHaveExitValue(0);
> 
> This looks like a good time to ensure the version is 1.1.* or at least 1.* (I haven't tested with 1.0.* versions). Also, when trying out with 3.0.0, there are only 2 failures (line 119 generating weak file failed without -legacy. line 479 succeeded with a warning).

ok, added version check ProcessTools.executeCommand(path, "version").shouldHaveExitValue(0).shouldMatch("1.1.*");

I tested with 1.0.2a version, test fails because some of the info messages are different.
eg: 'MAC: sha256, Iteration 10000' missing from stdout/stderr
1.0.2a  produces output as "MAC Iteration 10000" . ": sha256" is not there.

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

PR: https://git.openjdk.java.net/jdk/pull/4413


More information about the security-dev mailing list