test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSize.java
changeset 50791 b1e90a8a876c
parent 47694 214c5a0bdea3
--- a/test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSize.java	Tue Jun 26 09:52:21 2018 -0400
+++ b/test/hotspot/jtreg/serviceability/sa/TestInstanceKlassSize.java	Mon Jun 25 23:04:21 2018 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -41,9 +41,10 @@
 import java.io.*;
 import java.util.*;
 
-/*
+/**
  * @test
  * @library /test/lib
+ * @requires vm.hasSAandCanAttach
  * @modules java.base/jdk.internal.misc
  *          jdk.hotspot.agent/sun.jvm.hotspot
  *          jdk.hotspot.agent/sun.jvm.hotspot.utilities
@@ -174,11 +175,6 @@
 
     public static void main(String[] args) throws Exception {
 
-        if (!Platform.shouldSAAttach()) {
-            System.out.println("SA attach not expected to work - test skipped.");
-            return;
-        }
-
         if (args == null || args.length == 0) {
             System.out.println ("No args run. Starting with args now.");
             startMeWithArgs();