JDK-7035555 : attach/BasicTests.sh needs another tweak for Cygwin
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2011-04-11
  • Updated: 2012-03-21
  • Resolved: 2011-04-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b140Fixed
Related Reports
Relates :  
Relates :  
Description
The fix for the following bug:

    6962617 3/3 Testcase changes, cleanup of problem list for jdk_tools targets

modified the following SDK/JDK test:

    com/sun/tools/attach/BasicTests.sh

to include an override that would allow the test to pass on Win2K.
Unfortunately, the override is a little too broad and I noticed that
it was kicking in on my WinXP environment running Cygwin.

Here are the lines of interest:

     40 # Windows 2000 is a problem here, so we skip it, see 6962615
     41 osrev=`uname -a`
     42 if [ "`echo ${osrev} | grep 'CYGWIN'`" != "" ] ; then
     43   if [ "`echo ${osrev} | grep '5.0'`" != "" ] ; then
     44      echo "Treating as a pass, not testing Windows 2000"
     45      exit 0 
     46   fi
     47 fi

On WinXP VMware client, my "uname -a" output looks like:

$ uname -a
CYGWIN_NT-5.1 oliver-lt 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin

The "grep '5.0' on line 43 matches the "5(0" part of my environment's
uname -a output.

Comments
SUGGESTED FIX See attached 7035555-webrev-cr1.tgz for the proposed fix after changes from Code Review Round 0.
12-04-2011

SUGGESTED FIX See attached 7035555-webrev-cr0.tgz for the proposed fix.
12-04-2011

EVALUATION The description pretty much says it all. While I was reading the related bugs, I ran across some comments in the following bug: 6962615 3/3 Testcase failure com/sun/tools/attach/BasicTests.sh which talked about exceptions observed when the test passed. These exceptions are an expected part of two of the test cases executed by this test. However, the test output does not make this clear.
11-04-2011