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

Jiangli Zhou jiangli at openjdk.org
Mon Apr 21 03:08:08 UTC 2025


On Sun, 20 Apr 2025 03:42:32 GMT, SendaoYan <syan 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()`

@sendaoYan, `NativeLibrariesTest` is only used by [test/jdk/jdk/internal/loader/NativeLibraries/Main.java](https://github.com/openjdk/jdk/pull/24704/files/225d43fd59f190dfcff50f31e2cab6db2a4dd018#diff-9be6f1f8ea6281e6f1cdda8bf7e717174ea7d12af541c7772facd6af9e37f06b).

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

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


More information about the core-libs-dev mailing list