8079353: [TESTBUG] runtime/CompressedOops/UseCompressedOops.java failed on Windows when getting disjoint instead of zero based coops

On Windows, don't run sub-tests that can be affected by ASLR.

Reviewed-by: coleenp, mseledtsov
This commit is contained in:
Harold Seigel 2019-02-15 07:53:03 -05:00
parent 68d32a9a8a
commit 66aa45649a
2 changed files with 13 additions and 10 deletions

View File

@ -82,7 +82,6 @@ gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java 8193639 solaris-all
runtime/handshake/HandshakeWalkSuspendExitTest.java 8214174 generic-all
runtime/SharedArchiveFile/SASymbolTableTest.java 8193639 solaris-all
runtime/CompressedOops/UseCompressedOops.java 8079353 windows-all
#############################################################################

View File

@ -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 class UseCompressedOops {
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 @@ public class UseCompressedOops {
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 @@ public class UseCompressedOops {
.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 @@ public class UseCompressedOops {
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