jdk-24/jdk/test/java/rmi/testlibrary
Roger Riggs 6abc68f102 8163958: Improved garbage collection
Reviewed-by: smarks, chegar, skoivu, rhalade
2017-03-16 16:16:31 -04:00
..
ActivationLibrary.java 8067316: TEST_BUG: update RMI test library with better test.timeout.factor handling 2014-12-23 16:58:06 -08:00
JavaVM.java 8171142: jdk_rmi registry test fail to clean up on failure 2017-01-24 00:48:51 -08:00
README.jcov Initial load 2007-12-01 00:00:00 +00:00
RegistryRunner.java 8172314: java/rmi/registry/altSecurityManager/AltSecurityManager.java fails with "port in use" 2017-01-11 19:36:11 -08:00
RegistryVM.java 8172314: java/rmi/registry/altSecurityManager/AltSecurityManager.java fails with "port in use" 2017-01-11 19:36:11 -08:00
RemoteExiter.java 6943119: Rebrand source copyright notices 2010-05-25 15:58:33 -07:00
RMID.java 8172314: java/rmi/registry/altSecurityManager/AltSecurityManager.java fails with "port in use" 2017-01-11 19:36:11 -08:00
RMIDSelectorProvider.java 8168975: java/rmi/activation/Activatable tests fail due to "Port already in use" in RMID.restart() 2016-11-20 17:39:09 -08:00
RMIRegistryRunner.java 8172314: java/rmi/registry/altSecurityManager/AltSecurityManager.java fails with "port in use" 2017-01-11 19:36:11 -08:00
StreamPipe.java 8005290: remove -showversion from RMI test library subprocess mechanism 2012-12-20 20:11:45 -08:00
TestFailedException.java 6943119: Rebrand source copyright notices 2010-05-25 15:58:33 -07:00
TestLibrary.java 8005226: java/rmi/transport/pinClientSocketFactory/PinClientSocketFactory.java fails intermittently 2015-03-05 17:04:47 +00:00
TestParams.java 8172314: java/rmi/registry/altSecurityManager/AltSecurityManager.java fails with "port in use" 2017-01-11 19:36:11 -08:00
TestSocketFactory.java 8163958: Improved garbage collection 2017-03-16 16:16:31 -04:00

######################################################################## 
# This file contains example scripts and property files for collecting 
# code coverage data of the RMI regression suite.
#
# Since many RMI regression tests spawn child VMs (either directly
# or through activation), special support is required for setting
# command line options and arguments needed by jcov - the code coverage 
# instrumentation and collection tool.  This special support is provided
# by properties in the test.props file.  If a file named ../../test.props 
# exists (assuming the working directory is "<path>/JTwork/scratch", this
# will find "<path>/test.props"), then it will be used by test library 
# code that spawns VMs or instances of rmid.  See the example test.props
# file below for the properties that may be defined.


######################################################################## 
# The following is a script used to execute RMI regression tests 
# on Solaris and collect code coverage data.

#!/bin/ksh
export JAVA_HOME=<path to special JDK jcov instrumented build>
export JT_HOME=<path to special JTREG build with jcov hooks>
export CLASSPATH=.:${JT_HOME}/javatest.jar
export OPTS="-Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods -timeoutFactor:4"
export TESTBASE=/files/<JDK workspace>/test
${JT_HOME}/solaris/bin/jtreg -Xrunjcov:file=/files/rmi.jcov ${OPTS} -va -w:/tmp/JT -r:/tmp/JTreport -jdk:${JAVA_HOME} ${TESTBASE}


########################################################################
# The following section is an example test.props property file
# used for collecting code coverage data for JDK 1.6.  These properties
# are currently supported:
#   jcov.options are the jcov options that should be added to VMs
#                system properties
#   rmid.jcov.args are the jcov options that should be added as
#                  arguments to rmid command line; effectively, these
#                  are identical to jcov.options but each option is
#                  prefaced with '-C'
#   jcov.sleep.multiplier is an integer that will be multiplied by
#                         various wait times in the test library; the
#                         default value used is '1'

jcov.options=-Xrunjcov:file=/files/rmi.jcov -Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods

rmid.jcov.args=-C-Xrunjcov:file=/files/rmi.jcov -C-Xms256m -C-Xmx256m -C-XX:+UseUnsupportedDeprecatedJVMPI -C-XX:+EnableJVMPIInstructionStartEvent -C-XX:-UseFastEmptyMethods -C-XX:-UseFastAccessorMethods

jcov.sleep.multiplier=3


########################################################################
# The following section is an example script that generates the
# jcov report.  The important documentation here is the list of Java
# packages and classes that are included in the RMI coverage report.

#!/bin/ksh

export CLASSPATH=<path to jcov.jar>
export SRCS=<path to sources of the instrumented JDK build>
java com.sun.tdk.jcov.MergerMain <path to jcov 'A' template for the build>template_a.jcov /files/rmi.jcov
java -Xms256m -Xmx512m com.sun.tdk.jcov.RepGenMain -fmt=html_ns -src_root=${SRCS} \
        -include=java.rmi.* \
        -include=java.rmi.activation.* \
        -include=java.rmi.dgc.* \
        -include=java.rmi.registry.* \
        -include=java.rmi.server.* \
        -include=sun.rmi.log.* \
        -include=sun.rmi.registry.* \
        -include=sun.rmi.runtime.* \
        -include=sun.rmi.server.* \
        -include=sun.rmi.transport.* \
        -include=sun.rmi.transport.proxy.* \
        -include=sun.rmi.transport.tcp.* \
        -include=java.lang.reflect.Proxy \
        -include=sun.misc.ProxyGenerator \
        -exclude=com.sun.rmi.rmid.* \
        -exclude=sun.rmi.rmic.* \
        -exclude=sun.rmi.rmic.iiop.* \
        -exclude=javax.rmi.ssl.* \
        java.jcov