On Tue, 20 Jun 2023 13:23:16 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
> Currently, a number of tests fail on macOS because they miss the core file > (e.g. serviceability/sa/TestJmapCore.java). > The reason is that configure detects on some setups that codesign does not > work ("checking if debug mode codesign is possible... no) . > So adding the needed entitlement to generate cores is not done in the build. > This is currently not checked later in the tests. > But without the entitlement, a core is not generated. Copyrights need updating. test/lib/jdk/test/lib/Platform.java line 264: > 262: > 263: > 264: public static boolean hasPlistEntriesOSX() throws IOException { Almost all of this is replicated from `isHardenedOSX()`. I wonder if there is a way to do some sharing while still maintaining separate APIs. Combining them into one API might make it harder to understand the code. Maybe a `launchCodesign()` API that returns the BufferedReader would help. test/lib/jdk/test/lib/Platform.java line 288: > 286: } > 287: } > 288: return false; Probably would be good to log that no Info.plist entry was found. test/lib/jdk/test/lib/util/CoreUtils.java line 131: > 129: return coreFileLocation; // success! > 130: } else { > 131: System.out.println("Core file not found, try to find a > reason for this"); Suggestion: System.out.println("Core file not found. Trying to find a reason why..."); ------------- PR Review: https://git.openjdk.org/jdk/pull/14562#pullrequestreview-1491685114 PR Review Comment: https://git.openjdk.org/jdk/pull/14562#discussion_r1237602062 PR Review Comment: https://git.openjdk.org/jdk/pull/14562#discussion_r1237587271 PR Review Comment: https://git.openjdk.org/jdk/pull/14562#discussion_r1237590277