--- a/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSJstackPrintAll.java Thu Aug 02 09:27:40 2018 -0700
+++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSJstackPrintAll.java Thu Aug 02 14:40:55 2018 -0700
@@ -37,6 +37,7 @@
import jdk.test.lib.cds.CDSTestUtils;
import jdk.test.lib.cds.CDSOptions;
import jdk.test.lib.apps.LingeredApp;
+import jtreg.SkippedException;
public class ClhsdbCDSJstackPrintAll {
@@ -64,17 +65,15 @@
null, null);
if (useSharedSpacesOutput == null) {
+ LingeredApp.stopApp(theApp);
// Attach permission issues.
- System.out.println("Could not determine the UseSharedSpaces value - test skipped.");
- LingeredApp.stopApp(theApp);
- return;
+ throw new SkippedException("Could not determine the UseSharedSpaces value");
}
if (!useSharedSpacesOutput.contains("true")) {
// CDS archive is not mapped. Skip the rest of the test.
- System.out.println("The CDS archive is not mapped - test skipped.");
LingeredApp.stopApp(theApp);
- return;
+ throw new SkippedException("The CDS archive is not mapped");
}
cmds = List.of("jstack -v", "printall", "where -a");
@@ -113,6 +112,8 @@
"illegal code",
"Failure occurred at bci"));
test.run(theApp.getPid(), cmds, expStrMap, unExpStrMap);
+ } catch (SkippedException e) {
+ throw e;
} catch (Exception ex) {
throw new RuntimeException("Test ERROR " + ex, ex);
} finally {