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

Sean Coffey coffeys at openjdk.org
Thu Oct 9 08:31:04 UTC 2025


On Fri, 15 Aug 2025 10:41:40 GMT, Mikhail Yankelevich <myankelevich 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 ?

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

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


More information about the security-dev mailing list