8014068: TEST_BUG: compiler/ciReplay/TestSA.sh fails on Windows: core wasn't generated
authoriignatyev
Wed, 15 May 2013 22:44:52 +0400
changeset 17387 201ce4a5360b
parent 17386 e3b1a1af9968
child 17388 8193ee82efbe
8014068: TEST_BUG: compiler/ciReplay/TestSA.sh fails on Windows: core wasn't generated Reviewed-by: kvn
hotspot/test/compiler/ciReplay/TestSA.sh
hotspot/test/compiler/ciReplay/common.sh
--- a/hotspot/test/compiler/ciReplay/TestSA.sh	Mon May 13 14:36:39 2013 -0700
+++ b/hotspot/test/compiler/ciReplay/TestSA.sh	Wed May 15 22:44:52 2013 +0400
@@ -77,10 +77,11 @@
         "replay data wasn't generated by SA"
 fi
 
-diff --brief ${replay_data} replay_vm.txt
-if [ $? -ne 0 ]
+diff ${replay_data} replay_vm.txt > replay.diff 2>&1
+if [ -s replay.diff ]
 then
-    echo WARNING: replay.txt from SA != replay.txt from VM
+    echo WARNING: replay.txt from SA != replay.txt from VM:
+    cat replay.diff
 fi
 
 common_tests 10 
--- a/hotspot/test/compiler/ciReplay/common.sh	Mon May 13 14:36:39 2013 -0700
+++ b/hotspot/test/compiler/ciReplay/common.sh	Wed May 15 22:44:52 2013 +0400
@@ -182,8 +182,11 @@
 # crash vm in compiler thread with generation replay data and 'small' dump-file
 # $@ - additional vm opts
 generate_replay() {
-    # enable core dump
-    ulimit -c unlimited
+    if [ $VM_OS != "windows" ]
+    then
+        # enable core dump
+        ulimit -c unlimited
+    fi
 
     cmd="${JAVA} ${TESTVMOPTS} $@ \
             -Xms8m \
@@ -206,29 +209,24 @@
     echo GENERATION OF REPLAY.TXT:
     echo $cmd
 
-    ${cmd} 2>&1 > crash.out
+    ${cmd} > crash.out 2>&1
     
     core_locations=`grep -i core crash.out | grep "location:" | \
             sed -e 's/.*location: //'`
     rm crash.out 
     # processing core locations for *nix
-    if [ $OS != "windows" ]
+    if [ $VM_OS != "windows" ]
     then
         # remove 'or' between '/core.<pid>' and 'core'
         core_locations=`echo $core_locations | \
                 sed -e 's/\([^ ]*\) or \([^ ]*\)/\1 \2/'`
         # add <core_path>/core.<pid> core.<pid>
-        core=`echo $core_locations | awk '{print $1}'`
-        dir=`dirname $core`
-        core=`basename $core`
-        if [ -n ${core} ]
+        core_with_dir=`echo $core_locations | awk '{print $1}'`
+        dir=`dirname $core_with_dir`
+        core_with_pid=`echo $core_locations | awk '{print $2}'`
+        if [ -n ${core_with_pid} ]
         then
-            core_locations="$core_locations $dir${FS}$core"
-        fi
-        core=`echo $core_locations | awk '{print $2}'`
-        if [ -n ${core} ]
-        then
-            core_locations="$core_locations $dir${FS}$core"
+            core_locations="$core_locations $dir${FS}$core_with_pid $core_with_pid"
         fi
     fi