changeset 54937:622c26f0673f

8079353: [TESTBUG] runtime/CompressedOops/UseCompressedOops.java failed on Windows when getting disjoint instead of zero based coops Summary: On Windows, don't run sub-tests that can be affected by ASLR. Reviewed-by: coleenp, mseledtsov
author hseigel
date Fri, 15 Feb 2019 07:53:03 -0500
parents 454d54d8af1c
children 5d20b085d893
files test/hotspot/jtreg/ProblemList.txt test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java
diffstat 2 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/ProblemList.txt	Fri Feb 15 12:09:53 2019 +0100
+++ b/test/hotspot/jtreg/ProblemList.txt	Fri Feb 15 07:53:03 2019 -0500
@@ -82,7 +82,6 @@
 
 runtime/handshake/HandshakeWalkSuspendExitTest.java 8214174 generic-all
 runtime/SharedArchiveFile/SASymbolTableTest.java 8193639 solaris-all
-runtime/CompressedOops/UseCompressedOops.java 8079353 windows-all
 
 #############################################################################
 
--- a/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java	Fri Feb 15 12:09:53 2019 +0100
+++ b/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java	Fri Feb 15 07:53:03 2019 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, 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
@@ -45,7 +45,9 @@
 
     public static void main(String[] args) throws Exception {
         testCompressedOopsModesGCs();
-        testCompressedOopsModesGCs("-XX:+UseLargePages");
+        if (!Platform.isOSX() && !Platform.isAix()) {
+            testCompressedOopsModesGCs("-XX:+UseLargePages");
+        }
     }
 
     public static void testCompressedOopsModesGCs(String... flags) throws Exception {
@@ -73,7 +75,7 @@
         Collections.addAll(args, flags2);
 
         if (Platform.is64bit()) {
-            // Explicitly turn of compressed oops
+            // Explicitly turn off compressed oops
             testCompressedOops(args, "-XX:-UseCompressedOops", "-Xmx32m")
                 .shouldNotContain("Compressed Oops")
                 .shouldHaveExitValue(0);
@@ -88,11 +90,13 @@
                 .shouldContain("Compressed Oops mode")
                 .shouldHaveExitValue(0);
 
-            // Skip the following three test cases if we're on OSX or Solaris.
+            // Skip the following seven test cases if we're on OSX, Windows, or Solaris.
             //
-            // OSX doesn't seem to care about HeapBaseMinAddress and Solaris
-            // puts the heap way up, forcing different behaviour.
-            if (!Platform.isOSX() && !Platform.isSolaris()) {
+            // OSX doesn't seem to care about HeapBaseMinAddress.  Windows memory
+            // locations are affected by ASLR.  Solaris puts the heap way up,
+            // forcing different behaviour.
+            if (!Platform.isOSX() && !Platform.isWindows() && !Platform.isSolaris()) {
+
                 // Larger than 4gb heap should result in zero based with shift 3
                 testCompressedOops(args, "-XX:+UseCompressedOops", "-Xmx5g")
                     .shouldContain("Zero based")
@@ -179,8 +183,8 @@
     private static OutputAnalyzer testCompressedOops(ArrayList<String> flags1, String... flags2) throws Exception {
         ArrayList<String> args = new ArrayList<>();
 
-        // Always run with these three:
-        args.add("-XX:+PrintCompressedOopsMode");
+        // Always run with these two:
+        args.add("-Xlog:gc+heap+coops=trace");
         args.add("-Xms32m");
 
         // Add the extra flags