RFR: 8360373: src/java.base/share/classes/sun/security/util/Debug.java implement negative testing

Mikhail Yankelevich myankelevich at openjdk.org
Thu Oct 9 14:14:00 UTC 2025


On Thu, 9 Oct 2025 08:28:24 GMT, Sean Coffey <coffeys at openjdk.org> wrote:

>> Please consider my proposal to add some negative testing to the Debug.java. 
>> 
>> Adding a test, that will automatically convert current test cases into a broken parameters and expecting the successful execution, but without a debug result. This approach should keep the simplicity of adding new test cases, as this is happening automatically.
>
> test/jdk/sun/security/util/Debug/DebugOptions.java line 140:
> 
>> 138: 
>> 139:         final OutputAnalyzer outputAnalyzer = ProcessTools.executeTestJava(
>> 140:                 paramName + "NONSENSE" + nonsenseParam + "NONSENSE",
> 
> you're printing the test parms in the "Executing" statement at line 135 but then you're augmenting this value further in the executeTestJava method call. Is that intended ?

Thanks for spotting this! no, this is an error, it should have been printed in full. Changed in the next commit

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26796#discussion_r2416944181


More information about the security-dev mailing list