8056237: [TESTBUG] gc/g1/TestHumongousShrinkHeap.java fails due to OOM
Summary: Added respect for available memory. Renamed function names
Reviewed-by: jwilhelm, tschatzl
Contributed-by: andrey.x.zakharov@oracle.com
############################################################################# Copyright (c) 2009, 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# 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.############################################################################## List of tests that should not be run by test/Makefile, for various reasons:# 1. Does not run with jtreg -samevm mode# 2. Causes problems in jtreg -samevm mode for jtreg or tests that follow it# 3. The test is too slow or consumes too many system resources# 4. The test fails when run on any official build systems## It is possible that a test being on this list is a mistake, and that some# other test in samevm mode caused tests to fail, mistakes happen.## Tests marked @ignore are not run by test/Makefile, but harmless to be listed.## Tests that explicitly state "@run main/othervm ...", and are not listed here,# will be run in the same batch as the samevm tests.## Shell tests are othervm by default.## List items are testnames followed by labels, all MUST BE commented# as to why they are here and use a label:# generic-all Problems on all platforms# generic-ARCH Where ARCH is one of: sparc, sparcv9, x64, i586, etc.# OSNAME-all Where OSNAME is one of: solaris, linux, windows, macosx, aix# OSNAME-ARCH Specific on to one OSNAME and ARCH, e.g. solaris-amd64# OSNAME-REV Specific on to one OSNAME and REV, e.g. solaris-5.8## More than one label is allowed but must be on the same line.################################################################################ Running the tests:# cd test && make JT_HOME=jtreg_home PRODUCT_HOME=jdk_home jdk_all# Or instead of jdk_all, use any of the jdk_* targets.## Samevm Notes:# * Although some tests may have only been seen to fail on some platforms,# they might be flagged as 'generic-all' because the problem they have# could cause hidden slowdowns on other platforms.# Most samevm problems will be generic-all, but windows usually dislikes# them the most.# Address already in use or connection errors indicate a generic port issue.# (this is not necessarily a samevm issue, but an issue for running the tests# on shared machines, two people or two test runs will collide).# * Samevm problem (windows in particular) is not closing all input/output# * Samevm problem when a test calls setSecurityManager()# * Samevm problem with setHttps*() is used? (not exactly sure here)# * Samevm problem when stuffing system properties with non Strings or anything# * Samevm problem when changing vm settings, or registering any vm actions# * Samevm problems with deleteOnExit(), if it must happen at end of test# * Samevm problems with URLClassLoader? (no details here)# * Samevm problems with dependence on predictable GC or finalizations## Any of the above problems may mean the test needs to be flagged as "othervm".################################################################################ Fixing the tests:## Some tests just may need to be run with "othervm", and that can easily be# done my adding a @run line (or modifying any existing @run):# @run main/othervm NameOfMainClass# Make sure this @run follows any use of @library.# Otherwise, if the test is a samevm possibility, make sure the test is# cleaning up after itself, closing all streams, deleting temp files, etc.## Keep in mind that the bug could be in many places, and even different per# platform, it could be a bug in any one of:# - the testcase# - the jdk (jdk classes, native code, or hotspot)# - the native compiler# - the javac compiler# - the OS (depends on what the testcase does)## If you managed to really fix one of these tests, here is how you can# remove tests from this list:# 1. Make sure test passes on all platforms with samevm, or mark it othervm# 2. Make sure test passes on all platforms when run with it's entire group# 3. Make sure both VMs are tested, -server and -client, if possible# 4. Make sure you try the -d64 option on Solaris# 5. Use a tool like JPRT or something to verify these results# 6. Delete lines in this file, include the changes with your test changes## You may need to repeat your testing 2 or even 3 times to verify good# results, some of these samevm failures are not very predictable.########################################################################################################################################################### jdk_awt############################################################################# jdk_beans############################################################################# jdk_lang############################################################################# jdk_management# 8046351com/sun/management/GarbageCollectorMXBean/GarbageCollectionNotificationContentTest.java generic-allcom/sun/management/GarbageCollectorMXBean/GarbageCollectionNotificationTest.java generic-all############################################################################# jdk_jmx# 8030957com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java aix-allcom/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java aix-alljavax/management/MBeanServer/OldMBeanServerTest.java aix-all############################################################################# jdk_math############################################################################# jdk_other# 6988950demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java generic-all############################################################################# jdk_net# 7148829sun/net/InetAddress/nameservice/simple/CacheTest.java generic-allsun/net/InetAddress/nameservice/simple/DefaultCaching.java generic-all# 7122846java/net/MulticastSocket/NoLoopbackPackets.java macosx-alljava/net/MulticastSocket/SetLoopbackMode.java macosx-all# 7145658java/net/MulticastSocket/Test.java macosx-all# 7143960java/net/DatagramSocket/SendDatagramToBadAddress.java macosx-all############################################################################# jdk_nio# 6963118java/nio/channels/Selector/Wakeup.java windows-all# 7141822java/nio/channels/DatagramChannel/ChangingAddress.java macosx-all# 7132677java/nio/channels/Selector/OutOfBand.java macosx-all# 7158947, Solaris 11java/nio/file/WatchService/Basic.java solaris-alljava/nio/file/WatchService/LotsOfEvents.java solaris-all############################################################################# jdk_rmi# 7146541java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java linux-all# 7191877java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java generic-all# 7195095sun/rmi/transport/proxy/EagerHttpFallback.java generic-all############################################################################# jdk_security# 7157786sun/security/pkcs11/ec/TestKeyFactory.java generic-all# 7164518: no PortUnreachableException on Mac# 8051952: Unreachable.java test failing on Windowssun/security/krb5/auto/Unreachable.java windows-all,macosx-all# 6988842: 4 tests failing on Solaris 5.10sun/security/pkcs11/Secmod/AddPrivateKey.java solaris-allsun/security/pkcs11/ec/ReadCertificates.java solaris-allsun/security/pkcs11/ec/ReadPKCS12.java solaris-allsun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java solaris-all# 7041639: Solaris DSA keypair generation bugjava/security/KeyPairGenerator/SolarisShortDSA.java solaris-allsun/security/tools/keytool/standard.sh solaris-all############################################################################# jdk_sound############################################################################# jdk_swing############################################################################# jdk_text############################################################################# jdk_time############################################################################# jdk_tools# Tests take too long, on sparcs see 7143279tools/pack200/CommandLineTests.java solaris-all,macosx-alltools/pack200/Pack200Test.java solaris-all,macosx-all# 8007410tools/launcher/FXLauncherTest.java linux-all############################################################################# jdk_jdi# 6983531com/sun/jdi/BadHandshakeTest.java linux-all,windows-all# 8004127com/sun/jdi/RedefineImplementor.sh generic-all# 8031555com/sun/jdi/JdbMethodExitTest.sh generic-all# 8041934com/sun/jdi/RepStep.java generic-all# 8044419com/sun/jdi/JdbReadTwiceTest.sh generic-all############################################################################# jdk_util############################################################################# jdk_instrument# 8037082java/lang/instrument/NativeMethodPrefixAgent.java generic-all############################################################################# svc_tools# 8031482sun/tools/jcmd/TestJcmdSanity.java windows-all# 8033104sun/jvmstat/monitor/MonitoredVm/CR6672135.java generic-all# 8041989sun/tools/jstatd/TestJstatdDefaults.java generic-all# 8037285sun/tools/jstatd/TestJstatdServer.java generic-all# 8046355sun/tools/jstatd/TestJstatdExternalRegistry.java generic-all############################################################################