RFR: 8354898: jdk/internal/loader/NativeLibraries/Main.java fails on static JDK

SendaoYan syan at openjdk.org
Sun Apr 20 03:44:40 UTC 2025


On Wed, 16 Apr 2025 23:41:40 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

> Please review this simple test change that skips the test case loading using JDK `libzip.so` on static JDK in test/jdk/jdk/internal/loader/NativeLibraries/Main.java. AFAICT, the test case using `NativeLibrariesTest.LIB_NAME` (`libnativeLibrariesTest.so`) can provide coverage on static JDK.
> 
> Thanks

test/jdk/jdk/internal/loader/NativeLibraries/Main.java line 61:

> 59:         // load zip library from JDK
> 60:         if (!Platform.isStatic()) {
> 61:             test.load(System.mapLibraryName("zip"), true /* succeed */);

Hi, the other tests which also call `NativeLibrariesTest.load(String, boolean)`, does the other tests also need this check `!Platform.isStatic()`

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24704#discussion_r2051627101


More information about the core-libs-dev mailing list