changeset 7433:6464714dd742

8062537: [TESTBUG] Conflicting GC combinations in hotspot tests Reviewed-by: brutisso
author eistepan
date Wed, 19 Nov 2014 17:43:19 +0300
parents 5398ffa1a419
children 403aceebe7ac 239c6f5f0db3
files test/compiler/regalloc/C1ObjectSpillInLogicOp.java test/gc/6581734/Test6581734.java test/gc/TestSystemGC.java test/gc/arguments/TestAlignmentToUseLargePages.java test/gc/arguments/TestG1HeapRegionSize.java test/gc/concurrentMarkSweep/DisableResizePLAB.java test/gc/defnew/HeapChangeLogging.java test/gc/g1/TestHumongousShrinkHeap.java test/gc/g1/TestRegionAlignment.java test/gc/g1/TestShrinkAuxiliaryData.java test/gc/g1/TestShrinkAuxiliaryData05.java test/gc/g1/TestShrinkAuxiliaryData10.java test/gc/g1/TestShrinkAuxiliaryData15.java test/gc/g1/TestShrinkAuxiliaryData20.java test/gc/g1/TestShrinkAuxiliaryData25.java test/gc/g1/TestShrinkAuxiliaryData30.java test/gc/g1/TestShrinkToOneRegion.java test/gc/metaspace/G1AddMetaspaceDependency.java test/gc/metaspace/TestMetaspacePerfCounters.java test/gc/metaspace/TestPerfCountersAndMemoryPools.java test/gc/parallelScavenge/TestDynShrinkHeap.java
diffstat 21 files changed, 36 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/test/compiler/regalloc/C1ObjectSpillInLogicOp.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/compiler/regalloc/C1ObjectSpillInLogicOp.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -24,6 +24,7 @@
 /*
  * @test
  * @bug 8027751
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @summary C1 crashes generating G1 post-barrier in Unsafe.getAndSetObject() intrinsic because of the new value spill
  * @run main/othervm -XX:+UseG1GC C1ObjectSpillInLogicOp
  *
--- a/test/gc/6581734/Test6581734.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/6581734/Test6581734.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -24,6 +24,7 @@
 /*
  * @test Test6581734.java
  * @bug 6581734
+ * @requires vm.gc=="ConcMarkSweep" | vm.gc=="null"
  * @summary CMS Old Gen's collection usage is zero after GC which is incorrect
  * @run main/othervm -Xmx512m -verbose:gc -XX:+UseConcMarkSweepGC Test6581734
  *
--- a/test/gc/TestSystemGC.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/TestSystemGC.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2014, 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
@@ -24,6 +24,7 @@
 /*
  * @test TestSystemGC
  * @key gc
+ * @requires vm.gc=="null"
  * @summary Runs System.gc() with different flags.
  * @run main/othervm TestSystemGC
  * @run main/othervm -XX:+UseSerialGC TestSystemGC
--- a/test/gc/arguments/TestAlignmentToUseLargePages.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/arguments/TestAlignmentToUseLargePages.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -28,6 +28,7 @@
  * @bug 8024396
  * @key gc
  * @key regression
+ * @requires vm.gc=="null"
  * @run main/othervm -Xms7M -Xmx9M -XX:+UseParallelGC -XX:-UseParallelOldGC -XX:+UseLargePages TestAlignmentToUseLargePages
  * @run main/othervm -Xms7M -Xmx9M -XX:+UseParallelGC -XX:-UseParallelOldGC -XX:-UseLargePages TestAlignmentToUseLargePages
  * @run main/othervm -Xms7M -Xmx9M -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+UseLargePages TestAlignmentToUseLargePages
--- a/test/gc/arguments/TestG1HeapRegionSize.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/arguments/TestG1HeapRegionSize.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2014, 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
@@ -25,11 +25,12 @@
  * @test TestG1HeapRegionSize
  * @key gc
  * @bug 8021879
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @summary Verify that the flag G1HeapRegionSize is updated properly
  * @run main/othervm -Xmx64m TestG1HeapRegionSize 1048576
- * @run main/othervm -XX:G1HeapRegionSize=2m -Xmx64m TestG1HeapRegionSize 2097152
- * @run main/othervm -XX:G1HeapRegionSize=3m -Xmx64m TestG1HeapRegionSize 2097152
- * @run main/othervm -XX:G1HeapRegionSize=64m -Xmx256m TestG1HeapRegionSize 33554432
+ * @run main/othervm -XX:G1HeapRegionSize=2m -Xmx64m -XX:+UseG1GC TestG1HeapRegionSize 2097152
+ * @run main/othervm -XX:G1HeapRegionSize=3m -Xmx64m -XX:+UseG1GC TestG1HeapRegionSize 2097152
+ * @run main/othervm -XX:G1HeapRegionSize=64m -Xmx256m -XX:+UseG1GC TestG1HeapRegionSize 33554432
  */
 
 import sun.management.ManagementFactoryHelper;
@@ -41,14 +42,8 @@
   public static void main(String[] args) {
     HotSpotDiagnosticMXBean diagnostic = ManagementFactoryHelper.getDiagnosticMXBean();
 
-    VMOption option = diagnostic.getVMOption("UseG1GC");
-    if (option.getValue().equals("false")) {
-      System.out.println("Skipping this test. It is only a G1 test.");
-      return;
-    }
-
     String expectedValue = getExpectedValue(args);
-    option = diagnostic.getVMOption("G1HeapRegionSize");
+    VMOption option = diagnostic.getVMOption("G1HeapRegionSize");
     if (!expectedValue.equals(option.getValue())) {
       throw new RuntimeException("Wrong value for G1HeapRegionSize. Expected " + expectedValue + " but got " + option.getValue());
     }
--- a/test/gc/concurrentMarkSweep/DisableResizePLAB.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/concurrentMarkSweep/DisableResizePLAB.java	Wed Nov 19 17:43:19 2014 +0300
@@ -26,6 +26,7 @@
  * @key gc
  * @bug 8060467
  * @author filipp.zhinkin@oracle.com, john.coomes@oracle.com
+ * @requires vm.gc=="ConcMarkSweep" | vm.gc=="null"
  * @summary Run CMS with PLAB resizing disabled and a small OldPLABSize
  * @run main/othervm -XX:+UseConcMarkSweepGC -XX:-ResizePLAB -XX:OldPLABSize=1k -Xmx256m -XX:+PrintGCDetails DisableResizePLAB
  */
--- a/test/gc/defnew/HeapChangeLogging.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/defnew/HeapChangeLogging.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -28,8 +28,6 @@
  * @build HeapChangeLogging
  * @summary Allocate to get a promotion failure and verify that that heap change logging is present.
  * @run main HeapChangeLogging
- *
- * Test the output of G1SummarizeRSetStats in conjunction with G1SummarizeRSetStatsPeriod.
  */
 
 import java.util.regex.Matcher;
@@ -78,4 +76,4 @@
     payload = new byte[payloadSize];
     this.previous = previous;
   }
-}
\ No newline at end of file
+}
--- a/test/gc/g1/TestHumongousShrinkHeap.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/g1/TestHumongousShrinkHeap.java	Wed Nov 19 17:43:19 2014 +0300
@@ -24,6 +24,7 @@
 /**
  * @test TestHumongousShrinkHeap
  * @bug 8036025 8056043
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @summary Verify that heap shrinks after GC in the presence of fragmentation due to humongous objects
  * @library /testlibrary
  * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=12 -XX:+UseG1GC -XX:G1HeapRegionSize=1M -verbose:gc TestHumongousShrinkHeap
--- a/test/gc/g1/TestRegionAlignment.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/g1/TestRegionAlignment.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -24,6 +24,7 @@
 /*
  * @test TestRegionAlignment.java
  * @bug 8013791
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @summary Make sure that G1 ergonomics pick a heap size that is aligned with the region size
  * @run main/othervm -XX:+UseG1GC -XX:G1HeapRegionSize=32m -XX:MaxRAM=555m TestRegionAlignment
  *
--- a/test/gc/g1/TestShrinkAuxiliaryData.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/g1/TestShrinkAuxiliaryData.java	Wed Nov 19 17:43:19 2014 +0300
@@ -69,9 +69,7 @@
         printTestInfo(maxCacheSize);
 
         vmOpts.add("-XX:G1ConcRSLogCacheSize=" + RSetCacheSize);
-
-        vmOpts.addAll(Arrays.asList(Utils.getFilteredTestJavaOpts(
-                ShrinkAuxiliaryDataTest.prohibitedVmOptions)));
+        vmOpts.addAll(Arrays.asList(Utils.getTestJavaOpts()));
 
         // for 32 bits ObjectAlignmentInBytes is not a option
         if (Platform.is32bit()) {
@@ -272,14 +270,5 @@
         private static final int NUM_OBJECTS_PER_REGION = 10;
         private static final int NUM_LINKS = 20; // how many links create for each object
 
-        private static final String[] prohibitedVmOptions = {
-            // remove this when @requires option will be on duty
-            "-XX:\\+UseParallelGC",
-            "-XX:\\+UseSerialGC",
-            "-XX:\\+UseConcMarkSweepGC",
-            "-XX:\\+UseParallelOldGC",
-            "-XX:\\+UseParNewGC",
-            "-Xconcgc"
-        };
     }
 }
--- a/test/gc/g1/TestShrinkAuxiliaryData05.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/g1/TestShrinkAuxiliaryData05.java	Wed Nov 19 17:43:19 2014 +0300
@@ -26,6 +26,7 @@
  * @bug 8038423
  * @summary Checks that decommitment occurs for JVM with different
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @library /testlibrary /testlibrary/whitebox
  * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData05
  * @run driver/timeout=720 TestShrinkAuxiliaryData05
--- a/test/gc/g1/TestShrinkAuxiliaryData10.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/g1/TestShrinkAuxiliaryData10.java	Wed Nov 19 17:43:19 2014 +0300
@@ -26,6 +26,7 @@
  * @bug 8038423
  * @summary Checks that decommitment occurs for JVM with different
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @library /testlibrary /testlibrary/whitebox
  * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData10
  * @run driver/timeout=720 TestShrinkAuxiliaryData10
--- a/test/gc/g1/TestShrinkAuxiliaryData15.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/g1/TestShrinkAuxiliaryData15.java	Wed Nov 19 17:43:19 2014 +0300
@@ -26,6 +26,7 @@
  * @bug 8038423
  * @summary Checks that decommitment occurs for JVM with different
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @library /testlibrary /testlibrary/whitebox
  * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData15
  * @run driver/timeout=720 TestShrinkAuxiliaryData15
--- a/test/gc/g1/TestShrinkAuxiliaryData20.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/g1/TestShrinkAuxiliaryData20.java	Wed Nov 19 17:43:19 2014 +0300
@@ -26,6 +26,7 @@
  * @bug 8038423
  * @summary Checks that decommitment occurs for JVM with different
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @library /testlibrary /testlibrary/whitebox
  * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData20
  * @run driver/timeout=720 TestShrinkAuxiliaryData20
--- a/test/gc/g1/TestShrinkAuxiliaryData25.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/g1/TestShrinkAuxiliaryData25.java	Wed Nov 19 17:43:19 2014 +0300
@@ -26,6 +26,7 @@
  * @bug 8038423
  * @summary Checks that decommitment occurs for JVM with different
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @library /testlibrary /testlibrary/whitebox
  * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData25
  * @run driver/timeout=720 TestShrinkAuxiliaryData25
--- a/test/gc/g1/TestShrinkAuxiliaryData30.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/g1/TestShrinkAuxiliaryData30.java	Wed Nov 19 17:43:19 2014 +0300
@@ -26,6 +26,7 @@
  * @bug 8038423
  * @summary Checks that decommitment occurs for JVM with different
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @library /testlibrary /testlibrary/whitebox
  * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData30
  * @run driver/timeout=720 TestShrinkAuxiliaryData30
--- a/test/gc/g1/TestShrinkToOneRegion.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/g1/TestShrinkToOneRegion.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -24,6 +24,7 @@
 /*
  * @test TestShrinkToOneRegion.java
  * @bug 8013872
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @summary Shrinking the heap down to one region used to hit an assert
  * @run main/othervm -XX:+UseG1GC -XX:G1HeapRegionSize=32m -Xmx256m TestShrinkToOneRegion
  *
--- a/test/gc/metaspace/G1AddMetaspaceDependency.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/metaspace/G1AddMetaspaceDependency.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -24,6 +24,7 @@
 /*
  * @test G1AddMetaspaceDependency
  * @bug 8010196
+ * @requires vm.gc=="G1" | vm.gc=="null"
  * @summary Checks that we don't get locking problems when adding metaspace dependencies with the G1 update buffer monitor
  * @run main/othervm -XX:+UseG1GC -XX:G1UpdateBufferSize=1 G1AddMetaspaceDependency
  */
--- a/test/gc/metaspace/TestMetaspacePerfCounters.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/metaspace/TestMetaspacePerfCounters.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -29,6 +29,7 @@
 
 /* @test TestMetaspacePerfCounters
  * @bug 8014659
+ * @requires vm.gc=="null"
  * @library /testlibrary
  * @summary Tests that performance counters for metaspace and compressed class
  *          space exists and works.
--- a/test/gc/metaspace/TestPerfCountersAndMemoryPools.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/metaspace/TestPerfCountersAndMemoryPools.java	Wed Nov 19 17:43:19 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -30,6 +30,7 @@
 /* @test TestPerfCountersAndMemoryPools
  * @bug 8023476
  * @library /testlibrary
+ * @requires vm.gc=="Serial" | vm.gc=="null"
  * @summary Tests that a MemoryPoolMXBeans and PerfCounters for metaspace
  *          report the same data.
  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedKlassPointers -XX:+UseSerialGC -XX:+UsePerfData -Xint TestPerfCountersAndMemoryPools
--- a/test/gc/parallelScavenge/TestDynShrinkHeap.java	Tue Oct 21 15:07:25 2014 +0200
+++ b/test/gc/parallelScavenge/TestDynShrinkHeap.java	Wed Nov 19 17:43:19 2014 +0300
@@ -25,6 +25,7 @@
  * @ignore 8019361
  * @test TestDynShrinkHeap
  * @bug 8016479
+ * @requires vm.gc=="Parallel" | vm.gc=="null"
  * @summary Verify that the heap shrinks after full GC according to the current values of the Min/MaxHeapFreeRatio flags
  * @library /testlibrary
  * @run main/othervm -XX:+UseAdaptiveSizePolicyWithSystemGC -XX:+UseParallelGC -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 -Xmx1g -verbose:gc TestDynShrinkHeap