--- old/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects001/referringObjects001.java 2018-06-06 00:31:29.288747149 +0200 +++ new/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/referringObjects/referringObjects001/referringObjects001.java 2018-06-06 00:31:29.040736440 +0200 @@ -152,10 +152,10 @@ else expectedInstanceCount = 0; - // Note! - // Test broken - assumes that no GC is run before heap walk. - // G1 fails, just like ZGC, if en explicitly GC is done here. - // forceGC(); + // Note! This test is broken, in the sense that it incorrectly assumes + // that no GC can happen before it walks the heap. In practice, it seems + // to only affect this test when using ZGC. However, this test will also + // fail when using other GCs if an explicit GC is done here. checkDebugeeAnswer_instanceCounts(className, expectedInstanceCount, objectsToFilter); checkDebugeeAnswer_instances_referringObjects(objectsToFilter, className, expectedInstanceCount, includedInReferrersCount, referrerCount); --- old/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances003/instances003.java 2018-06-06 00:31:29.622761571 +0200 +++ new/test/hotspot/jtreg/vmTestbase/nsk/jdi/ReferenceType/instances/instances003/instances003.java 2018-06-06 00:31:29.391751596 +0200 @@ -126,10 +126,10 @@ ":" + referrerCount + ":" + referrerType + (referrerType.equals(ObjectInstancesManager.WEAK_REFERENCE) ? "|" + ObjectInstancesManager.STRONG_REFERENCE : "")); - // Note! - // Test broken - assumes that no GC is run before heap walk. - // G1 fails, just like ZGC, if en explicitly GC is done here. - // forceGC(); + // Note! This test is broken, in the sense that it incorrectly assumes + // that no GC can happen before it walks the heap. In practice, it seems + // to only affect this test when using ZGC. However, this test will also + // fail when using other GCs if an explicit GC is done here. // the instance counts should not be affected by creating multiple references checkDebugeeAnswer_instanceCounts(className, createInstanceCount, objectsToFilter); --- old/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Instances/instances001/instances001.java 2018-06-06 00:31:29.995777677 +0200 +++ new/test/hotspot/jtreg/vmTestbase/nsk/jdwp/ReferenceType/Instances/instances001/instances001.java 2018-06-06 00:31:29.738766579 +0200 @@ -157,10 +157,10 @@ long typeID = debuggee.getReferenceTypeID(createTypeSignature(testClassName)); - // Note! - // Test broken - assumes that no GC is run before heap walk. - // G1 fails, just like ZGC, if en explicitly GC is done here. - // forceGC(); + // Note! This test is broken, in the sense that it incorrectly assumes + // that no GC can happen before it walks the heap. In practice, it seems + // to only affect this test when using ZGC. However, this test will also + // fail when using other GCs if an explicit GC is done here. // create command with maxInstances=1, only 1 instance should be returned testClass(typeID, 1, 1, false, 0); --- old/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/InstanceCounts/instanceCounts001/instanceCounts001.java 2018-06-06 00:31:30.379794258 +0200 +++ new/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/InstanceCounts/instanceCounts001/instanceCounts001.java 2018-06-06 00:31:30.119783031 +0200 @@ -165,10 +165,10 @@ if (!isDebuggeeReady()) return; - // Note! - // Test broken - assumes that no GC is run before heap walk. - // G1 fails, just like ZGC, if en explicitly GC is done here. - // forceGC(); + // Note! This test is broken, in the sense that it incorrectly assumes + // that no GC can happen before it walks the heap. In practice, it seems + // to only affect this test when using ZGC. However, this test will also + // fail when using other GCs if an explicit GC is done here. int expectedCount = instanceCounts001a.expectedCount; --- old/test/jdk/TEST.ROOT 2018-06-06 00:31:30.767811011 +0200 +++ new/test/jdk/TEST.ROOT 2018-06-06 00:31:30.514800087 +0200 @@ -37,6 +37,7 @@ requires.properties= \ sun.arch.data.model \ java.runtime.name \ + vm.gc.Z \ vm.graal.enabled \ vm.cds --- old/test/jdk/java/lang/management/MemoryMXBean/MemoryTestZGC.sh 2018-06-06 00:31:31.149827506 +0200 +++ new/test/jdk/java/lang/management/MemoryMXBean/MemoryTestZGC.sh 2018-06-06 00:31:30.891816366 +0200 @@ -23,12 +23,7 @@ # # @test -# @bug 4530538 -# @summary -# @author Mandy Chung -# # @requires vm.gc.Z -# # @run compile MemoryTest.java # @run shell MemoryTestZGC.sh # --- /dev/null 2018-04-03 12:55:20.301839954 +0200 +++ new/test/hotspot/jtreg/gc/stress/gcbasher/TestGCBasherWithZ.java 2018-06-06 00:31:31.274832904 +0200 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2016, 2018, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +import java.io.IOException; + +/* + * @test TestGCBasherWithZ + * @key gc stress + * @requires vm.gc.Z + * @requires vm.flavor == "server" & !vm.emulatedClient + * @summary Stress ZGC + * @run main/othervm/timeout=200 -Xlog:gc*=info -Xmx384m -server -XX:+UnlockExperimentalVMOptions -XX:+UseZGC TestGCBasherWithZ 120000 + */ +public class TestGCBasherWithZ { + public static void main(String[] args) throws IOException { + TestGCBasher.main(args); + } +} --- /dev/null 2018-04-03 12:55:20.301839954 +0200 +++ new/test/hotspot/jtreg/gc/stress/gclocker/TestGCLockerWithZ.java 2018-06-06 00:31:31.653849269 +0200 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2017, 2018, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test TestGCLockerWithZ + * @key gc + * @requires vm.gc.Z + * @summary Stress ZGC's GC locker by calling GetPrimitiveArrayCritical while concurrently filling up the heap. + * @run main/native/othervm/timeout=200 -Xlog:gc*=info -Xms2000m -Xmx2000m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC TestGCLockerWithZ + */ +public class TestGCLockerWithZ { + public static void main(String[] args) { + String[] testArgs = {"2", "ZHeap"}; + TestGCLocker.main(testArgs); + } +} --- /dev/null 2018-04-03 12:55:20.301839954 +0200 +++ new/test/hotspot/jtreg/gc/stress/gcold/TestGCOldWithZ.java 2018-06-06 00:31:32.038865893 +0200 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2017, 2018, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * @test TestGCOldWithZ + * @key gc + * @requires vm.gc.Z + * @summary Stress the Z + * @run main/othervm -Xmx384M -XX:+UnlockExperimentalVMOptions -XX:+UseZGC TestGCOldWithZ 50 1 20 10 10000 + * @run main/othervm -Xmx256m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC TestGCOldWithZ 50 5 20 1 5000 + */ +public class TestGCOldWithZ { + public static void main(String[] args) { + TestGCOld.main(args); + } +}