906 fi |
906 fi |
907 |
907 |
908 debuggeepid= |
908 debuggeepid= |
909 waitForJdbMsg Listening 4 |
909 waitForJdbMsg Listening 4 |
910 |
910 |
911 beOption="-agentlib:jdwp=transport=$transport,address=$address,server=n,suspend=y" |
911 beOption="-agentlib:jdwp=transport=$transport,address=$address,server=n,suspend=y" |
912 # beOption="-Xdebug -Xrunjdwp:transport=$transport,address=$address,server=n,suspend=y" |
912 # beOption="-Xdebug -Xrunjdwp:transport=$transport,address=$address,server=n,suspend=y" |
913 |
913 |
914 thecmd="$jdk/bin/$java $mode -classpath $tmpFileDir $baseArgs $args \ |
914 thecmd="$jdk/bin/$java $mode -classpath $tmpFileDir $baseArgs $args \ |
915 -Djtreg.classDir=$TESTCLASSES \ |
915 -Djtreg.classDir=$TESTCLASSES \ |
916 -showversion \ |
916 -showversion \ |
974 while [ 1 = 1 ] ; do |
974 while [ 1 = 1 ] ; do |
975 findPid $jdbpid |
975 findPid $jdbpid |
976 if [ $? != 0 ] ; then |
976 if [ $? != 0 ] ; then |
977 break |
977 break |
978 fi |
978 fi |
|
979 |
979 if [ ! -z "$isWin98" ] ; then |
980 if [ ! -z "$isWin98" ] ; then |
980 $psCmd | $grep -i 'JDB\.EXE' >$devnull 2>&1 |
981 $psCmd | $grep -i 'JDB\.EXE' >$devnull 2>&1 |
981 if [ $? != 0 ] ; then |
982 if [ $? != 0 ] ; then |
982 break |
983 break |
983 fi |
984 fi |
984 fi |
985 fi |
985 # Something went wrong |
986 |
986 jdbFailIfPresent "Input stream closed" |
987 # (Don't use jdbFailIfPresent here since it is not safe |
|
988 # to call from different processes) |
|
989 $grep -s 'Input stream closed' $jdbOutFile > $devnull 2>&1 |
|
990 if [ $? = 0 ] ; then |
|
991 dofail "jdb input stream closed prematurely" |
|
992 fi |
987 |
993 |
988 # If a failure has occured, quit |
994 # If a failure has occured, quit |
989 if [ -r "$failFile" ] ; then |
995 if [ -r "$failFile" ] ; then |
990 break |
996 break |
991 fi |
997 fi |
992 |
998 |
993 sleep ${sleep_seconds} |
999 sleep ${sleep_seconds} |
994 done |
1000 done |
995 |
1001 |
996 # jdb exited because its input stream closed prematurely |
1002 # jdb exited because its input stream closed prematurely |
997 jdbFailIfPresent "Input stream closed" |
1003 # (Don't use jdbFailIfPresent here since it is not safe |
|
1004 # to call from different processes) |
|
1005 $grep -s 'Input stream closed' $jdbOutFile > $devnull 2>&1 |
|
1006 if [ $? = 0 ] ; then |
|
1007 dofail "jdb input stream closed prematurely" |
|
1008 fi |
998 |
1009 |
999 # It is necessary here to avoid the situation when JDB exited but |
1010 # It is necessary here to avoid the situation when JDB exited but |
1000 # mydojdbCmds() didn't finish because it waits for JDB message |
1011 # mydojdbCmds() didn't finish because it waits for JDB message |
1001 # in waitForJdbMsg(), at the same time main process will finish |
1012 # in waitForJdbMsg(), at the same time main process will finish |
1002 # the execution with no errors. |
1013 # the execution with no errors. |