changeset 52024:257ae7e677c3

8211438: [Testbug] runtime/XCheckJniJsig/XCheckJSig.java looks for libjsig in wrong location Summary: Remove the os_arch string and JRE path from the test. Also add JNIEXPORT to libjsig symbols so dlsym can find them Reviewed-by: dholmes, lfoltan
author hseigel
date Fri, 05 Oct 2018 08:50:49 -0400
parents d0c04d180a3b
children e75f6076d391
files src/java.base/unix/native/libjsig/jsig.c test/hotspot/jtreg/ProblemList.txt test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java
diffstat 3 files changed, 6 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/unix/native/libjsig/jsig.c	Fri Oct 05 11:28:23 2018 +0100
+++ b/src/java.base/unix/native/libjsig/jsig.c	Fri Oct 05 08:50:49 2018 -0400
@@ -312,7 +312,7 @@
 }
 
 /* The three functions for the jvm to call into. */
-void JVM_begin_signal_setting() {
+JNIEXPORT void JVM_begin_signal_setting() {
   signal_lock();
   sigemptyset(&jvmsigs);
   jvm_signal_installing = true;
@@ -320,7 +320,7 @@
   signal_unlock();
 }
 
-void JVM_end_signal_setting() {
+JNIEXPORT void JVM_end_signal_setting() {
   signal_lock();
   jvm_signal_installed = true;
   jvm_signal_installing = false;
@@ -328,7 +328,7 @@
   signal_unlock();
 }
 
-struct sigaction *JVM_get_signal_action(int sig) {
+JNIEXPORT struct sigaction *JVM_get_signal_action(int sig) {
   allocate_sact();
   /* Does race condition make sense here? */
   if (sigismember(&jvmsigs, sig)) {
--- a/test/hotspot/jtreg/ProblemList.txt	Fri Oct 05 11:28:23 2018 +0100
+++ b/test/hotspot/jtreg/ProblemList.txt	Fri Oct 05 08:50:49 2018 -0400
@@ -84,7 +84,6 @@
 runtime/CompressedOops/UseCompressedOops.java 8079353 generic-all
 runtime/RedefineTests/RedefineRunningMethods.java 8208778 macosx-x64
 runtime/SharedArchiveFile/SASymbolTableTest.java 8193639 solaris-all
-runtime/XCheckJniJsig/XCheckJSig.java 8211084 macosx-x64
 
 #############################################################################
 
--- a/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java	Fri Oct 05 11:28:23 2018 +0100
+++ b/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java	Fri Oct 05 08:50:49 2018 -0400
@@ -44,29 +44,21 @@
         System.out.println("Regression test for bugs 7051189 and 8023393");
 
         String jdk_path = System.getProperty("test.jdk");
-        String os_arch = Platform.getOsArch();
         String libjsig;
         String env_var;
         if (Platform.isOSX()) {
             env_var = "DYLD_INSERT_LIBRARIES";
-            libjsig = jdk_path + "/jre/lib/libjsig.dylib"; // jdk location
-            if (!(new File(libjsig).exists())) {
-                libjsig = jdk_path + "/lib/libjsig.dylib"; // jre location
-            }
+            libjsig = jdk_path + "/lib/libjsig.dylib"; // jre location
         } else {
             env_var = "LD_PRELOAD";
-            libjsig = jdk_path + "/jre/lib/" + os_arch + "/libjsig.so"; // jdk location
-            if (!(new File(libjsig).exists())) {
-                libjsig = jdk_path + "/lib/" + os_arch + "/libjsig.so"; // jre location
-            }
+            libjsig = jdk_path + "/lib/libjsig.so"; // jre location
         }
         // If this test fails, these might be useful to know.
         System.out.println("libjsig: " + libjsig);
-        System.out.println("osArch: " + os_arch);
 
         // Make sure the libjsig file exists.
         if (!(new File(libjsig).exists())) {
-            throw new jtreg.SkippedException("File " + libjsig + " not found");
+            throw new RuntimeException("File libjsig not found, path: " + libjsig);
         }
 
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xcheck:jni", "-version");