On Thu, 18 Dec 2025 23:05:35 GMT, Alexander Matveev <[email protected]>
wrote:
> - I was not able to reproduce this issue.
> - Based on log we calling same detach command simultaneously:
>
> [08:49:10.288] TRACE: exec: Execute [/usr/bin/hdiutil detach -force -verbose
> /Volumes/Foo](5); discard out+err...
> [08:49:10.274] TRACE: exec: Execute [/usr/bin/hdiutil detach -force -verbose
> /Volumes/Foo](5); discard out+err...
>
> - I think `hdiutil` does not handle attaching/detaching DMG with same name
> asynchronously multiple times well enough.
> - Fixed by mounting DMG into random location.
> - Added `-nobrowse`, so DMG will not be added to Finder. We do not need DMG
> to be shown in Finder when attached during test.
Changes requested by asemenyuk (Reviewer).
test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacHelper.java line 89:
> 87: final Path mountRoot;
> 88: try {
> 89: mountRoot = Files.createTempDirectory("mountRoot");
Temporary test files should be created in the test working directory. Use
`TKit.createTempDirectory("mount-root")` instead.
It also makes the newly added `TKit.deleteDirectoryRecursive(mountRoot, "");`
call redundant, as the test working directory will be deleted automatically
when the test exits.
`TKit.createTempDirectory()` throws unchecked exceptions; the `try/catch` is
redundant.
-------------
PR Review: https://git.openjdk.org/jdk/pull/28912#pullrequestreview-3596572759
PR Review Comment: https://git.openjdk.org/jdk/pull/28912#discussion_r2633421368