[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    [Fwd: Re: SDK Test Fixes Batch for 2010.07 (6941287, 6962804, 6964018)]
From:       daniel.daugherty () oracle ! com (Daniel D !  Daugherty)
Date:       2010-07-21 20:12:19
Message-ID: 4C4754A3.3060808 () oracle ! com
[Download RAW message or body]

Here is relevant e-mail about the third fix (6964018) that
I sent to Alan Bateman off list. It's probably interesting
to anyone else that plans to review 6964018...

Dan



-------- Original Message --------
Subject: 	Re: SDK Test Fixes Batch for 2010.07 (6941287, 6962804, 6964018)
Date: 	Wed, 21 Jul 2010 09:16:29 -0600
From: 	Daniel D. Daugherty <daniel.daugherty at oracle.com>
Reply-To: 	daniel.daugherty at oracle.com
To: 	Alan Bateman <Alan.Bateman at oracle.com>
References: 	<4C45EC65.7020707 at oracle.com>



On 7/20/2010 12:35 PM, Daniel D. Daugherty wrote:
> The third fix gets my recent Logger WeakReference leak tests back into
> the available test mix:
>
>     http://cr.openjdk.java.net/~dcubed/6964018-webrev/0/
>
> This fix refactors and enhances some of the test infrastructure in
> test/sun/tools/common/* and changes the new Logger WeakReference leak
> tests to use that infrastructure. Other tests in test/sun/tools/*
> also need minor tweaks to fit into the new infrastructure.

Here is what changed in the webrev. Now that I've written it out
I can see why it looks like a lot. I'm hoping that you think I've
made some good and useful improvements to both the infrastructure
and tests that you created...

Dan


test/java/util/logging/AnonLoggerWeakRefLeak.java
 - refactored to be a subclass of SimpleApplication
 - changed duration from 60 -> 120 seconds because 60 seconds wasn't
   reliably reproducing the leak on an overloaded test machine

test/java/util/logging/AnonLoggerWeakRefLeak.sh
 - refactored to use sun/tools/common/* infrastructure
   - drop incoming env check; now in CommonSetup.sh
   - drop command paths; now in CommonSetup.sh
   - drop grep_cmd function and rework both grep calls and
     sed calls to use PATTERN_EOL and PATTERN_WS constants
   - drop flag setting code; now in CommonSetup.sh
   - drop app launch and pid finding stuff in favor of
     startApplication, stopApplication, waitApplication and
     killApplication
 - changed timeout from 3 minutes to 4 minutes since test can now run
   for 2 minutes instead of 1 minute
 - rework jmap version check to not crash process group on Linux
 - rework jmap retry stuff to work around intermittent jmap bugs
 - allow for early termination if instance count is the same or
   decreasing which indicates that the bits being tested have the fix.
 - clarify messages when the test fails and when the test pass

test/java/util/logging/LoggerWeakRefLeak.java
 - refactored to be a subclass of SimpleApplication

test/java/util/logging/LoggerWeakRefLeak.sh
 - same fixes as for AnonLoggerWeakRefLeak.sh except the timeout was
   already 4 minutes for this test

test/sun/tools/common/ApplicationSetup.sh
 - startApplication changes:
   - rename exported "pid" variable to appJavaPid; add appOtherPid,
     appPidList and appOutput exported variables
   - refactor "-classpath $TESTCLASSES" into function
   - switch to "$@" to preserve arg spacing
   - redirect stderr to output file in addition to stdout
   - refactor Cygwin pid logic to use "ps" and "sed" instead of
     "ps", "tail" and "awk" (fewer pipes and processes)
   - refactor MKS pid logic use "ps" and "sed" instead of "ps",
     "grep", "grep", "cut" (fewer pipes and processes)

 - stopApplication changes
   - refactor ShutdownSimpleApplication classname into function

 - add waitForApplication() and killApplication functions

test/sun/tools/common/CommonSetup.sh
 - add JPS program path constant; also sorted the constants
 - add PATTERN_EOL and PATTERN_WS constants
 - cleanup incoming env vars check a bit
 - add 'set -eu' for paranoia
 - add isFoo flags (Cygwin, MKS, Linux,Solaris, Unknown and Windows)
 - change Cygwin PS value from ";" to (default) ":"

test/sun/tools/common/CommonTests.sh
 - new tests for the infrastructure in ApplicationSetup.sh and
   CommonSetup.sh; allows for easier porting

test/sun/tools/common/ShutdownSimpleApplication.java
 - Fix comment about the class argument being a file that contains
   the port number instead of being the port number
 - added a usage check for wrong number of parameters
 - added a "done connecting" message
 - added System.exit(0) (set -e now in use)

test/sun/tools/common/SimpleApplication.java
 - clarify that the class argument is a file that contains the port
   number.
 - refactor main() into doMyAppStart(), doMyAppWork() and
   doMyAppFinish() pieces to permit easy subclassing
 - add getMyApp() and setMyApp()
 - refactor main() to permit subclassing

test/sun/tools/common/SleeperApplication.java
 - add SleeperApplication to illustrate subclassing of SimpleApplication

test/sun/tools/jhat/ParseTest.sh
 - add missing failed variable initialization
 - add 'set +e' since this test already checks return statuses

test/sun/tools/jinfo/Basic.sh
 - refactor startApplication and stopApplication calls
 - add waitForApplication call
 - use "appJavaPid" variable instead of "pid" variable
 - use new flags as appropriate
 - add 'set +e' since this test already checks return statuses

test/sun/tools/jmap/Basic.sh
 - refactor startApplication and stopApplication calls
 - add waitForApplication call
 - use "appJavaPid" variable instead of "pid" variable
 - add 'set +e' since this test already checks return statuses
 - delete unnecessary "p" variable setting and usage

test/sun/tools/jstack/Basic.sh
 - refactor startApplication and stopApplication calls
 - add waitForApplication call
 - use "appJavaPid" variable instead of "pid" variable
 - add 'set +e' since this test already checks return statuses




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic