--- a/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java Thu Aug 02 09:27:40 2018 -0700
+++ b/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java Thu Aug 02 14:40:55 2018 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
+ * @requires vm.family == "solaris" | vm.family == "linux" | vm.family == "mac"
* @run main XCheckJSig
*/
@@ -36,15 +37,12 @@
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.Platform;
+import jtreg.SkippedException;
public class XCheckJSig {
public static void main(String args[]) throws Throwable {
System.out.println("Regression test for bugs 7051189 and 8023393");
- if (!Platform.isSolaris() && !Platform.isLinux() && !Platform.isOSX()) {
- System.out.println("Test only applicable on Solaris, Linux, and Mac OSX, skipping");
- return;
- }
String jdk_path = System.getProperty("test.jdk");
String os_arch = Platform.getOsArch();
@@ -69,8 +67,7 @@
// Make sure the libjsig file exists.
if (!(new File(libjsig).exists())) {
- System.out.println("File " + libjsig + " not found, skipping");
- return;
+ throw new jtreg.SkippedException("File " + libjsig + " not found");
}
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xcheck:jni", "-version");