RFR: 8347007: --strip-debug removes parameter names included with -parameters [v3]
Alan Bateman
alanb at openjdk.org
Fri Oct 10 10:51:19 UTC 2025
On Thu, 9 Oct 2025 18:28:04 GMT, Henry Jen <henryjen at openjdk.org> wrote:
>> test/jdk/tools/jlink/plugins/StripParameterNamesTest.java line 67:
>>
>>> 65: private static List<Jmod> testJmods = new ArrayList<>();
>>> 66:
>>> 67: record Jmod(Path moduleDir, boolean withDebugInfo, boolean withParameterNames) {}
>>
>> Is the withDebugInfo component used?
>
> Not at this point, as we don't try to verify debug info simply because we have that covered in StripJavaDebugAttributesPluginTest.java.
> I can remove it if we like, it describes how the jmod was built.
Okay, I was mostly looking to see if it is used and wasn't sure if missed something.
>> test/jdk/tools/jlink/plugins/StripParameterNamesTest.java line 189:
>>
>>> 187: Process process = processBuilder.start();
>>> 188: int exitCode = process.waitFor();
>>> 189: var output = process.inputReader().readLine();
>>
>> Have you looked into using jdk.test.lib.process.ProcessTools?
>
> What do you recommend? Since I don't need complex processing of output, so I just did this.
My preference would be to use ProcessTools because tests that launch other VMs are amongst the most troublesome. The jlink tests, link most areas, have grow organically, and there is a mix of Process/ProcessBuilder and ProcessTools. So I'm okay with what you have, maybe some day we can migrate the existing tests to use ProcessTools and make them more robust.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27566#discussion_r2419398438
PR Review Comment: https://git.openjdk.org/jdk/pull/27566#discussion_r2419394008
More information about the core-libs-dev
mailing list