< prev index next >
test/jdk/java/lang/ClassLoader/nativeLibrary/NativeLibraryTest.java
Print this page
rev 49499 : Exclude NativeLibraryTest.java on musl.
@@ -23,15 +23,20 @@
/*
* @test
* @bug 8164512 8191360
* @requires vm.compMode != "Xcomp"
+ * @requires !vm.musl
* @summary verify if the native library is unloaded when the class loader is GC'ed
* @build p.Test
* @run main/othervm/native -Xcheck:jni NativeLibraryTest
*/
+ // Clarification on @requires declarations:
+ // Under musl, dlclose is a no-op. The static variable 'count' in libnative.c keeps
+ // its value across a GC and the check in Test.java fails.
+
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.Files;
< prev index next >