8204165: Filter out tests requiring class unloading when ClassUnloading is disabled

Reviewed-by: coleenp, kbarrett
This commit is contained in:
Stefan Karlsson 2018-06-05 15:56:14 +02:00
parent b95d16720f
commit 8c5db24c99
41 changed files with 58 additions and 35 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 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
@ -24,6 +24,7 @@
/**
* @test
* @bug 8057967
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.misc
* java.base/jdk.internal.org.objectweb.asm
* @library patches /
@ -220,4 +221,3 @@ public class CallSiteDepContextTest {
System.out.println("TEST PASSED");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 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
@ -24,6 +24,7 @@
/*
* @test
* @bug 8072008
* @requires vm.opt.final.ClassUnloading
* @library /test/lib ../patches
* @modules java.base/jdk.internal.misc
* java.base/jdk.internal.vm.annotation

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@ -24,6 +24,7 @@
/*
* @test KeepAliveClass
* @summary This test case uses a java.lang.Class instance to keep a class alive.
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.misc
* @library /test/lib /runtime/testlibrary
* @library classes

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@ -24,6 +24,7 @@
/*
* @test KeepAliveClassLoader
* @summary This test case uses a java.lang.ClassLoader instance to keep a class alive.
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.misc
* @library /test/lib /runtime/testlibrary
* @library classes

View File

@ -24,6 +24,7 @@
/*
* @test KeepAliveObject
* @summary This test case uses a class instance to keep the class alive.
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.misc
* @library /test/lib /runtime/testlibrary
* @library classes

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@ -24,6 +24,7 @@
/*
* @test KeepAliveSoftReference
* @summary This test case uses a java.lang.ref.SoftReference referencing a class instance to keep a class alive.
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.misc
* @library /test/lib /runtime/testlibrary
* @library classes

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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
@ -23,6 +23,7 @@
/*
* @test UnloadTest
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.misc
* @library /runtime/testlibrary /test/lib
* @library classes
@ -64,4 +65,3 @@ public class UnloadTest {
ClassUnloadCommon.failIf(wb.isClassAlive(className), "should have been unloaded");
}
}

View File

@ -27,6 +27,7 @@
* @bug 8173743
* @requires vm.compMode != "Xcomp"
* @summary Failures during class definition can lead to memory leaks in metaspace
* @requires vm.opt.final.ClassUnloading
* @library /test/lib
* @run main/othervm test.DefineClass defineClass
* @run main/othervm test.DefineClass defineSystemClass

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* 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
@ -25,6 +25,7 @@
* @test
* @bug 8165246
* @summary Test has_previous_versions flag and processing during class unloading.
* @requires vm.opt.final.ClassUnloading
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @modules java.compiler

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* 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
@ -25,6 +25,7 @@
* @test
* @summary Test of method selection and resolution cases that
* generate AbstractMethodErrorTest
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.org.objectweb.asm
* @library /runtime/SelectionResolution/classes
* @run main/othervm/timeout=300 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies AbstractMethodErrorTest

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* 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
@ -25,6 +25,7 @@
* @test
* @summary Test of method selection and resolution cases that
* generate IncompatibleClassChangeError
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.org.objectweb.asm
* @library /runtime/SelectionResolution/classes
* @run main/othervm/timeout=500 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeInterfaceICCE

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* 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
@ -25,6 +25,7 @@
* @test
* @summary Test of method selection and resolution cases that
* generate InvokeInterfaceSuccessTest
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.org.objectweb.asm
* @library /runtime/SelectionResolution/classes
* @run main/othervm/timeout=300 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeInterfaceSuccessTest

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* 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
@ -25,6 +25,7 @@
* @test
* @summary Test of method selection and resolution cases that
* generate IncompatibleClassChangeError
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.org.objectweb.asm
* @library /runtime/SelectionResolution/classes
* @run main/othervm/timeout=1200 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeVirtualICCE

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* 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
@ -25,6 +25,7 @@
* @test
* @summary Test of method selection and resolution cases that
* generate InvokeVirtualSuccessTest
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.org.objectweb.asm
* @library /runtime/SelectionResolution/classes
* @run main/othervm/timeout=400 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeVirtualSuccessTest

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 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
@ -28,6 +28,7 @@
* unloaded.
* @requires vm.cds
* @requires vm.cds.custom.loaders
* @requires vm.opt.final.ClassUnloading
* @library /test/lib /test/hotspot/jtreg/runtime/appcds /test/hotspot/jtreg/runtime/testlibrary
* @modules java.base/jdk.internal.misc
* java.management

View File

@ -25,6 +25,7 @@
/*
* @test ClassLoadUnloadTest
* @bug 8142506
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.misc
* @library /test/lib /runtime/testlibrary
* @library classes

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* 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
@ -24,6 +24,7 @@
/*
* @test
* @summary Ensure module information is cleaned when owning class loader unloads
* @requires vm.opt.final.ClassUnloading
* @modules java.base/jdk.internal.misc
* @library /test/lib ..
* @build sun.hotspot.WhiteBox

View File

@ -34,6 +34,7 @@
* garbage collection takes place because their classloader is made unreachable
* at the end of the each loop iteration. The loop is repeated 1000 times.
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase
* /test/lib
* @run driver jdk.test.lib.FileInstaller . .

View File

@ -33,6 +33,7 @@
* parsed by HprofParser. It fills metaspace with classes till OutOfMemoryError,
* then uses JMap to create heap dump and then verifies created heap dump with HprofParser.
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase
* /test/lib
* @run driver jdk.test.lib.FileInstaller . .
@ -40,4 +41,3 @@
* heapdump.share.EatMemory
* @run shell/timeout=300 run.sh
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/shrink_grow/ShrinkGrowMultiJVM.
* VM Testbase keywords: [nonconcurrent]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build metaspace.shrink_grow.ShrinkGrowMultiJVM.ShrinkGrowMultiJVM

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/staticReferences.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy001.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -44,4 +45,3 @@
* -maxLevelSize 100
* -hierarchyType CLASSES
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy002.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -44,4 +45,3 @@
* -maxLevelSize 100
* -hierarchyType CLASSES
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy003.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -44,4 +45,3 @@
* -maxLevelSize 100
* -hierarchyType INTERFACES
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy004.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -44,4 +45,3 @@
* -maxLevelSize 100
* -hierarchyType INTERFACES
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy005.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -44,4 +45,3 @@
* -maxLevelSize 100
* -hierarchyType MIXED
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy006.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -44,4 +45,3 @@
* -maxLevelSize 100
* -hierarchyType MIXED
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy007.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -48,4 +49,3 @@
* -hierarchyType CLASSES
* -triggerUnloadingByFillingMetaspace
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy008.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -48,4 +49,3 @@
* -hierarchyType CLASSES
* -triggerUnloadingByFillingMetaspace
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy009.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -48,4 +49,3 @@
* -hierarchyType INTERFACES
* -triggerUnloadingByFillingMetaspace
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy010.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -48,4 +49,3 @@
* -hierarchyType INTERFACES
* -triggerUnloadingByFillingMetaspace
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy011.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -48,4 +49,3 @@
* -hierarchyType MIXED
* -triggerUnloadingByFillingMetaspace
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy012.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -48,4 +49,3 @@
* -hierarchyType MIXED
* -triggerUnloadingByFillingMetaspace
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy013.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -44,4 +45,3 @@
* -maxLevelSize 100
* -hierarchyType CLASSES
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy014.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -44,4 +45,3 @@
* -maxLevelSize 100
* -hierarchyType INTERFACES
*/

View File

@ -28,6 +28,7 @@
* @summary converted from VM Testbase metaspace/stressHierarchy/stressHierarchy015.
* VM Testbase keywords: [nonconcurrent, javac, no_cds]
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @build sun.hotspot.WhiteBox
@ -44,4 +45,3 @@
* -maxLevelSize 100
* -hierarchyType MIXED
*/

View File

@ -49,6 +49,7 @@
* - enable collection of class object using ObjectReference.enableCollection
* - check class object was collected
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase
* /test/lib
* @run driver jdk.test.lib.FileInstaller . .

View File

@ -41,6 +41,7 @@
* com.sun.jdi.ObjectCollectedException or com.sun.jdi.ClassNotLoadedException
* exception is thrown.
*
* @requires vm.opt.final.ClassUnloading
* @library /vmTestbase
* /test/lib
* @run driver jdk.test.lib.FileInstaller . .

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -25,6 +25,7 @@
* @test
* @bug 4909536
* @summary Ensure that the Introspector does not retain refs to classes
* @requires vm.opt.final.ClassUnloading
* @author Eamonn McManus
*
* @run clean ClassLeakTest

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 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
@ -24,6 +24,7 @@
/* @test
* @bug 6482247
* @summary Test that creating MXBeans does not introduce memory leaks.
* @requires vm.opt.final.ClassUnloading
* @author Eamonn McManus
*
* @run build LeakTest RandomMXBeanTest MerlinMXBean TigerMXBean

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 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
@ -25,6 +25,7 @@
* @test
* @bug 8058865
* @summary Checks correct collection of MXBean's class after unregistration
* @requires vm.opt.final.ClassUnloading
* @author Olivier Lagneau
*
* @library /lib/testlibrary