test/hotspot/jtreg/serviceability/sa/ClhsdbLongConstant.java
changeset 51287 7b1ddbafa134
parent 50791 b1e90a8a876c
child 53596 bb40a5303c84
--- a/test/hotspot/jtreg/serviceability/sa/ClhsdbLongConstant.java	Thu Aug 02 09:27:40 2018 -0700
+++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbLongConstant.java	Thu Aug 02 14:40:55 2018 -0700
@@ -21,13 +21,6 @@
  * questions.
  */
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import jdk.test.lib.apps.LingeredApp;
-import jdk.test.lib.Platform;
-
 /**
  * @test
  * @bug 8190198
@@ -37,6 +30,14 @@
  * @run main/othervm ClhsdbLongConstant
  */
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import jdk.test.lib.apps.LingeredApp;
+import jdk.test.lib.Platform;
+import jtreg.SkippedException;
+
 public class ClhsdbLongConstant {
 
     public static void main(String[] args) throws Exception {
@@ -75,11 +76,11 @@
             String longConstantOutput = test.run(theApp.getPid(), cmds, expStrMap, unExpStrMap);
 
             if (longConstantOutput == null) {
-                // Output could be null due to attach permission issues
-                // and if we are skipping this.
-                return;
+                throw new SkippedException("attach permission issues");
             }
             checkForTruncation(longConstantOutput);
+        } catch (SkippedException e) {
+            throw e;
         } catch (Exception ex) {
             throw new RuntimeException("Test ERROR " + ex, ex);
         } finally {