# HG changeset patch # User ctornqvi # Date 1410962112 25200 # Node ID fd74c05c4a7eeacd5750b84e4d790b62c9c1d3de # Parent 40ea2c41f53b58dc229587138d26b41a6f1c4ea6 8058369: [TESTBUG] runtime/CompressedOops/UseCompressedOops.java Exception java.lang.RuntimeException: 'Zero based' missing from stdout/stderr Summary: Solaris and OSX places the heap in unpredictable places, some of the test must be excluded on these platforms Reviewed-by: hseigel, coleenp diff -r 40ea2c41f53b -r fd74c05c4a7e hotspot/test/runtime/CompressedOops/UseCompressedOops.java --- a/hotspot/test/runtime/CompressedOops/UseCompressedOops.java Tue Sep 16 12:13:13 2014 +0200 +++ b/hotspot/test/runtime/CompressedOops/UseCompressedOops.java Wed Sep 17 06:55:12 2014 -0700 @@ -52,18 +52,17 @@ .shouldContain("Compressed Oops mode") .shouldHaveExitValue(0); - // Larger than 4gb heap should result in zero based with shift 3 - testCompressedOops("-XX:+UseCompressedOops", "-Xmx5g") - .shouldContain("Zero based") - .shouldContain("Oop shift amount: 3") - .shouldHaveExitValue(0); + // Skip the following three test cases if we're on OSX 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()) { + // Larger than 4gb heap should result in zero based with shift 3 + testCompressedOops("-XX:+UseCompressedOops", "-Xmx5g") + .shouldContain("Zero based") + .shouldContain("Oop shift amount: 3") + .shouldHaveExitValue(0); - // Skip the following three test cases if we're on OSX or Solaris Sparc. - // - // OSX doesn't seem to care about HeapBaseMinAddress and Solaris Sparc - // puts the heap way up, forcing different behaviour. - - if (!Platform.isOSX() && !(Platform.isSolaris() && Platform.isSparc())) { // Small heap above 4gb should result in zero based with shift 3 testCompressedOops("-XX:+UseCompressedOops", "-Xmx32m", "-XX:HeapBaseMinAddress=4g") .shouldContain("Zero based") @@ -83,6 +82,12 @@ .shouldContain("Non-zero based") .shouldContain("Oop shift amount: 4") .shouldHaveExitValue(0); + + // 32gb heap with object alignment set to 16 bytes should result in zero based with shift 4 + testCompressedOops("-XX:+UseCompressedOops", "-Xmx32g", "-XX:ObjectAlignmentInBytes=16") + .shouldContain("Zero based") + .shouldContain("Oop shift amount: 4") + .shouldHaveExitValue(0); } // Explicitly enabling compressed oops with 32gb heap should result a warning @@ -106,12 +111,6 @@ .shouldContain("Max heap size too large for Compressed Oops") .shouldHaveExitValue(0); - // 32gb heap with object alignment set to 16 bytes should result in zero based with shift 4 - testCompressedOops("-XX:+UseCompressedOops", "-Xmx32g", "-XX:ObjectAlignmentInBytes=16") - .shouldContain("Zero based") - .shouldContain("Oop shift amount: 4") - .shouldHaveExitValue(0); - } else { // Compressed oops should only apply to 64bit platforms testCompressedOops("-XX:+UseCompressedOops", "-Xmx32m")