jdk/test/sun/jvmstat/testlibrary/utils.sh
author martin
Wed, 02 Sep 2015 14:11:50 -0700
changeset 32427 c22b7e41adf3
parent 7668 d4a77089c587
permissions -rw-r--r--
8134984: Text files should end in exactly one newline Summary: automated fixup of newlines at end-of-file via the usual perl one-liner Reviewed-by: chegar, sherman
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
7668
d4a77089c587 6962318: Update copyright year
ohair
parents: 5813
diff changeset
     2
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4663
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4663
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4663
diff changeset
    21
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
setup() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
    # Verify directory context variables are set
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
    if [ "${TESTJAVA}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
        echo "TESTJAVA not set. Test cannot execute.  Failed."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
        exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
    fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
    if [ "${TESTCLASSES}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
        TESTCLASSES="."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
    fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    if [ "${TESTSRC}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
        TESTSRC="."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
    fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
    OS=`uname -s`
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    case ${OS} in
4663
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
    43
    Windows_* | CYGWIN*)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
        PS=";"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
        FS="\\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
        ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    *)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        PS=":"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
        FS="/"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
verify_os() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    OS=`uname -s`
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    case ${OS} in
4663
dfea6ffdb0dc 6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
ohair
parents: 2
diff changeset
    57
    Windows_95 | Windows_98 | Windows_ME | CYGWIN* )
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        echo "Test bypassed: jvmstat feature not supported on ${OS}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        exit 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    Windows_*)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        # verify that the tmp directory supports persistent ACLs, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        # are required for jvmstat to enable its shared memory feature.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
        # NOTE: FAT type files systems do not support ACLs, but NTFS files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
        # systems do.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
        #
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        echo "temp directory is in: `windir -t`"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
        TMPDRIVE=`windir -t | cut -d: -f1`
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        if [ "${TMPDRIVE}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
            echo "Could not get temp directory drive letter"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
            exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        echo "temp file system characteristics:"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
        sysinf drives -a | grep "^${TMPDRIVE}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        sysinf drives -a | grep "^${TMPDRIVE}" | grep PERSISTENT_ACLS > /dev/null
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        case $? in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
            ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
            echo "Test bypassed: jvmstat feature disabled because the temp"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
            echo "directory doesn't support persistent ACLs"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
            exit 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
            ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
        2)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
            echo "Could not get temp directory file system features"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
            exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
            ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        *)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
            echo "Unexpected return code from grep - $?"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
            exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
            ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
# function to kill the process with the given process id
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
kill_proc() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    kill_pid=$1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    if [ "${kill_pid}" = "" ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        echo "kill_proc(): null pid: ignored"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        return
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    if [ ${kill_pid} -le 0 ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
    then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        echo "kill_proc(): invalid pid: ${kill_pid}: ignored"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        return
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    OS=`uname -s`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    case $OS in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    Windows_*)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        case ${SHELL_VERSION} in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        [1234567].* | 8.[12345].*)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
            # when starting processes in the background, mks creates an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
            # intervening between the parent process and the background
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
            # process. The pid acquired for background process as acquired
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
            # by the $! shell variable is actually the pid of the invervening
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
            # shell and not that of the background process. Sending a specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
            # signal to the intervening shell will only effects the intervening 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
            # shell and not the background process, thus leaving the background
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
            # process running. The following code assumes that the pid passed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            # into this function as ${kill_pid}, was acquired by $!. Therefore,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            # in order to kill the background process, we must first find the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
            # children of ${kill_pid} (should be only one child) and kill them.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
            ps -o pid,ppid | grep "${kill_pid}$"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
            children=`mks_children ${kill_pid}`
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            echo "killing children of ${kill_pid}: ${children}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
            for child in ${children} ; do
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                kill_proc_common ${child}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
            done
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        *)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            # in mks 8.6 and later, the pid returned in $! is now the pid
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
            # of the background process and not that of the intervening shell.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
            kill_proc_common ${kill_pid}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
            ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
        ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    *)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        kill_proc_common ${kill_pid}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        ;;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    esac
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
mks_children() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    ppid=$1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    ps -o pid,ppid | grep "${ppid}$" | awk '
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
BEGIN	{ pids="" }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
	{ pids = pids $1 " " }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
END	{ print pids }'
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
kill_proc_common() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
   kpid=$1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    # verify that the process exists and we can signal it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    kill -0 ${kpid} 2>/dev/null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    if [ $? -ne 0 ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
    then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        echo "Could not signal >${kpid}<"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        echo "user id = `id`"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
        echo "process information :"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        ps -l -p ${kpid}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        return
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    kill -TERM ${kpid}		# hit it easy first
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    if [ $? -eq 0 ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        sleep 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
        kill -0 ${kpid} 2>/dev/null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
        # check if it's still hanging around
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
        if [ $? -eq 0 ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
        then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
            # it's still lingering, now it it hard
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
            kill -KILL ${kpid} 2>/dev/null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
            if [ $? -ne 0 ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
            then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
                echo "Could not kill ${kpid}!"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
            fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        echo "Error sending term signal to ${kpid}!"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
}
5813
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   192
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   193
# check to see if a port is free
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   194
checkPort() # port
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   195
{
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   196
    inuse=`netstat -a | egrep "\.$1"`
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   197
    if [ "${inuse}" = "" ] ; then
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   198
      echo "free"
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   199
    else
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   200
      echo "inuse"
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   201
    fi
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   202
}
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   203
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   204
# Get a free port, where port+1 is also free, return 0 when giving up
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   205
freePort()
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   206
{
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   207
  start=3000
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   208
  while [ ${start} -lt 3030 ] ; do
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   209
    port1=`expr ${start} '+' $$ '%' 1000`
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   210
    port2=`expr ${port1} '+' 1`
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   211
    if [ "`checkPort ${port1}`" = "inuse" \
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   212
         -o "`checkPort ${port2}`" = "inuse" ] ; then
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   213
      start=`expr ${start} '+' 1`
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   214
    else
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   215
      break
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   216
    fi
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   217
  done
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   218
  if [ "`checkPort ${port1}`" = "inuse" \
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   219
       -o "`checkPort ${port2}`" = "inuse" ] ; then
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   220
    port1="0"
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   221
  fi
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   222
  echo "${port1}"
8e455cd3e807 6962617: Testcase changes, cleanup of problem list for jdk_tools targets
ohair
parents: 5506
diff changeset
   223
}