RFR: 8375242: [macos] Improve jpackage signing coverage [v3]
Alexander Matveev
almatvee at openjdk.org
Fri Jan 16 19:58:56 UTC 2026
On Fri, 16 Jan 2026 04:17:32 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
>> test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java line 295:
>>
>>> 293: }
>>> 294:
>>> 295: public JPackageCommand setFakeRuntime() {
>>
>> I updated this function in https://github.com/openjdk/jdk/pull/29260 to include version for release file. Do you have suggestion on how resolve this conflict? I think we need ability to pass additional arguments to `setFakeRuntime(String version)`. In this case we will have `createInputRuntimeImage(RuntimeImageType role, String version)`, but it will not be clear to which runtime version should be applied.
>
>> I think we need ability to pass additional arguments to setFakeRuntime(String version)
>
> To suit the needs of a single test? Any chance we need a fake runtime with the "release" file in other tests?
>
>> In this case we will have `createInputRuntimeImage(RuntimeImageType role, String version)`
>
> Two major problems with this approach:
> - Eventually, we will end up with `createInputRuntimeImage(RuntimeImageType role, String version, String fooProperty, boolean barProperty, Date dateProperty)` signature. Which will be unreadable, just like we had it at https://github.com/openjdk/jdk/blob/6c48f4ed707bf0b15f9b6098de30db8aae6fa40f/src/jdk.jpackage/share/classes/jdk/jpackage/internal/IOUtils.java#L108 The calls will be equally unreadable to: https://github.com/openjdk/jdk/blob/6c48f4ed707bf0b15f9b6098de30db8aae6fa40f/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgPackager.java#L330
> - When the external runtime is specified for the test with the "jdk.jpackage.runtime-image" system property, what to do with the "version" parameter?
Agree. I reverted `setFakeRuntime(String version)` change in my PR and move this code under test.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29205#discussion_r2699782734
More information about the core-libs-dev
mailing list