test/hotspot/jtreg/runtime/CompressedOops/CompressedClassPointers.java
changeset 51287 7b1ddbafa134
parent 50406 314af5e1e787
child 52589 bd96a1bd01ca
--- a/test/hotspot/jtreg/runtime/CompressedOops/CompressedClassPointers.java	Thu Aug 02 09:27:40 2018 -0700
+++ b/test/hotspot/jtreg/runtime/CompressedOops/CompressedClassPointers.java	Thu Aug 02 14:40:55 2018 -0700
@@ -26,14 +26,17 @@
  * @bug 8024927
  * @summary Testing address of compressed class pointer space as best as possible.
  * @requires vm.opt.final.UseCompressedOops
+ * @requires vm.bits == 64
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @run main CompressedClassPointers
  */
 
 import jdk.test.lib.Platform;
 import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.process.OutputAnalyzer;
+import jtreg.SkippedException;
 
 public class CompressedClassPointers {
 
@@ -139,17 +142,10 @@
     }
 
     public static void main(String[] args) throws Exception {
-        if (!Platform.is64bit()) {
-            // Can't test this on 32 bit, just pass
-            System.out.println("Skipping test on 32bit");
-            return;
-        }
-        // Solaris 10 can't mmap compressed oops space without a base
         if (Platform.isSolaris()) {
              String name = System.getProperty("os.version");
              if (name.equals("5.10")) {
-                 System.out.println("Skipping test on Solaris 10");
-                 return;
+                throw new SkippedException("Solaris 10 can't mmap compressed oops space without a base");
              }
         }
         smallHeapTest();