RFR: 8248059: [macos] EmptyFolderPackageTest.java failed "hdiutil: create failed - No child processes"

Alexey Semenyuk alexey.semenyuk at oracle.com
Sat Jun 27 03:16:33 UTC 2020


Hi Alexander,

MacDmgBundler.java:
---
   94         } catch (IOException | PackagerException ex) {
   95             Log.verbose(ex);
   96             throw new PackagerException(ex);
   97         }
---

There is no need to add IOUtils.getFilesSizeInFolder() method.

---
new PathGroup(Map.of(new Object(), srcFolder.toPath())).sizeInBytes();
---
can be used to get the size of all regular files in `srcFolder` folder 
recursively. Besides there is resource leak in 
IOUtils.getFilesSizeInFolder() - close() should be called on the Stream 
object returned by Files.walk() call.

- Alexey

On 6/26/2020 9:22 PM, alexander.matveev at oracle.com wrote:
> Please review the jpackage fix for bug [1] at [2].
>
> Added fallback for creating DMG if original approach fails. In 
> original approach DMG will be created by providing app image to 
> hdiutil. It was noticed that helper sub-processes run by hdiutil to 
> copy app image sometimes crashed or failed during automated testing. 
> Fallback approach will create empty DMG and copy files manually. It 
> was observed that in this case hdiutil does not run sub-process that 
> caused tests to fail, so hopefully this workaround will fix issue. 
> Both cases produces same working DMG. Tests which failed due to this 
> issue was removed from ProblemList.
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8248059
> [2] http://cr.openjdk.java.net/~almatvee/8248059/webrev.00/
>
> Thanks,
> Alexander



More information about the core-libs-dev mailing list