8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 7051189 8023393 27 * @summary Need to suppress info message if -Xcheck:jni is used with libjsig.so 28 * @library /testlibrary 29 * @modules java.base/jdk.internal.misc 30 * java.management 31 * @run main XCheckJSig 32 */ 33 34 import java.io.File; 35 import java.util.Map; 36 import jdk.test.lib.*; 37 38 public class XCheckJSig { 39 public static void main(String args[]) throws Throwable { 40 41 System.out.println("Regression test for bugs 7051189 and 8023393"); 42 if (!Platform.isSolaris() && !Platform.isLinux() && !Platform.isOSX()) { 43 System.out.println("Test only applicable on Solaris, Linux, and Mac OSX, skipping"); 44 return; 45 } 46 47 String jdk_path = System.getProperty("test.jdk"); 48 String os_arch = Platform.getOsArch(); 49 String libjsig; 50 String env_var; 51 if (Platform.isOSX()) { 52 env_var = "DYLD_INSERT_LIBRARIES"; 53 libjsig = jdk_path + "/jre/lib/libjsig.dylib"; // jdk location 54 if (!(new File(libjsig).exists())) { 55 libjsig = jdk_path + "/lib/libjsig.dylib"; // jre location 56 } | 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 7051189 8023393 27 * @summary Need to suppress info message if -Xcheck:jni is used with libjsig.so 28 * @library /test/lib 29 * @modules java.base/jdk.internal.misc 30 * java.management 31 * @run main XCheckJSig 32 */ 33 34 import java.io.File; 35 import java.util.Map; 36 import jdk.test.lib.process.ProcessTools; 37 import jdk.test.lib.process.OutputAnalyzer; 38 import jdk.test.lib.Platform; 39 40 public class XCheckJSig { 41 public static void main(String args[]) throws Throwable { 42 43 System.out.println("Regression test for bugs 7051189 and 8023393"); 44 if (!Platform.isSolaris() && !Platform.isLinux() && !Platform.isOSX()) { 45 System.out.println("Test only applicable on Solaris, Linux, and Mac OSX, skipping"); 46 return; 47 } 48 49 String jdk_path = System.getProperty("test.jdk"); 50 String os_arch = Platform.getOsArch(); 51 String libjsig; 52 String env_var; 53 if (Platform.isOSX()) { 54 env_var = "DYLD_INSERT_LIBRARIES"; 55 libjsig = jdk_path + "/jre/lib/libjsig.dylib"; // jdk location 56 if (!(new File(libjsig).exists())) { 57 libjsig = jdk_path + "/lib/libjsig.dylib"; // jre location 58 } |