2362N/A# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. 0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A# This code is free software; you can redistribute it and/or modify it 0N/A# under the terms of the GNU General Public License version 2 only, as 0N/A# published by the Free Software Foundation. 0N/A# This code is distributed in the hope that it will be useful, but WITHOUT 0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A# version 2 for more details (a copy is included in the LICENSE file that 0N/A# accompanied this code). 0N/A# You should have received a copy of the GNU General Public License version 0N/A# 2 along with this work; if not, write to the Free Software Foundation, 0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A# @summary TTY: .jdbrc is read twice if jdb is run in the user's home dir 0N/A echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test." 0N/A echo "--Error: TESTCLASSES must be defined." 0N/A # Need this to convert to the /.automount/... form which 0N/A # is what jdb will report when it reads an init file. 0N/A# All output will go under this dir. We define HOME to 0N/A# be under here too, and pass it into jdb, to avoid problems 0N/A# with java choosing a value of HOME. 0N/A # $1 is the expected number of occurances of $2 in the jdb output. 0N/A if [ -r c:/ ] ; then 0N/A# Note: If jdb reads a file, it outputs a message containing 0N/A# If jdb can't read a file, it outputs a message containing 0N/Aecho "+++++++++++++++++++++++++++++++++++" 0N/Aecho "Verify each individual file is read" 0N/Aecho "+++++++++++++++++++++++++++++++++++" 0N/Aecho "Verify files are not read twice if cwd is ~" 0N/Aecho "+++++++++++++++++++++++++++++++++++" 0N/Aecho "If jdb.ini and both .jdbrc exist, don't read .jdbrc" 0N/Aecho "+++++++++++++++++++++++++++++++++++" 0N/Aecho "If files exist in both ~ and ., read both" 0N/Aif [ ! -r c:/ ] ;
then 0N/A # No symlinks on windows. 0N/A echo "+++++++++++++++++++++++++++++++++++" 0N/A echo "Don't read a . file that is a symlink to a ~ file" 0N/Aif [ ! -r c:/ ] ;
then 0N/A # No symlinks on windows. 0N/A echo "+++++++++++++++++++++++++++++++++++" 0N/A echo "Don't read a . file that is a target symlink of a ~ file" 0N/Aif [ ! -r c:/ ] ;
then 0N/A # Can't make a file unreadable under MKS. 0N/A echo "+++++++++++++++++++++++++++++++++++" 0N/A echo "Read an unreadable file - verify the read fails." 0N/A # If the file exists, we try to read it. The 0N/Aecho "+++++++++++++++++++++++++++++++++++" 0N/Aecho "Read a directory - verify the read fails" 0N/A# If the file (IE. directory) exists, we try to read it. The 0N/A echo "+++++++++++++++++++++++++++++++++++" 0N/A echo "Verify the jdb read command still works" 0N/A if [ ! -r c:/ ] ;
then 0N/A # Can't make a file unreadable under MKS 0N/A echo "One or more tests failed" 0N/Aecho "All tests passed"