4 # Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of version 2 of the GNU General Public License as
8 # published by the Free Software Foundation.
10 # This program is distributed in the hope that it would be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 # Further, this software is distributed without any warranty that it is
15 # free of the rightful claim of any third person regarding infringement
16 # or the like. Any license provided herein, whether implied or
17 # otherwise, applies only to this software file. Patent licenses, if
18 # any, provided herein do not apply to combinations of this program with
19 # other software, or any other product whatsoever.
21 # You should have received a copy of the GNU General Public License along
22 # with this program; if not, write the Free Software Foundation, Inc., 59
23 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
25 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
26 # Mountain View, CA 94043, or:
30 # For further information regarding this notice, see:
32 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
36 # setup and check for config parameters, and in particular
38 # TEST_DIR - scratch test directory that is in an already
39 # mounted XFS file system, needs to be be world
41 # TEST_DEV - device for file system containing TEST_DIR
42 # SCRATCH_DEV - device you can make a scratch file system on
43 # SCRATCH_MNT - mount point for scratch file system
46 # SCRATCH_LOGDEV - scratch log device for external log testing
47 # SCRATCH_RTDEV - scratch rt dev (only for testing cmds currently)
48 # TAPE_DEV - the tape device for the xfsdump tests
49 # RMT_TAPE_DEV - the remote tape device for the xfsdump tests
50 # RMT_IRIXTAPE_DEV - the IRIX remote tape device for the xfsdump tests
51 # RMT_TAPE_USER - remote user for tape device
55 # - This script is shared by the stress test system and the auto-qa
57 # - TEST_DEV & TEST_DIR must be assigned.
58 # - this script shouldn't make any assertions about filesystem
59 # validity or mountedness.
66 echo "Usage: _readlink filename" 1>&2
70 perl -e "\$in=\"$1\";" -e '
72 if ($lnk =~ m!^/.*!) {
76 chomp($dir = `dirname $in`);
89 SCRATCH_LOGDEV=/dev/sda7
91 RMT_TAPE_DEV=fuzzy:/dev/st0
92 RMT_IRIXTAPE_DEV=snort:/dev/tape
100 SCRATCH_LOGDEV=/dev/sda11
102 RMT_TAPE_DEV=bruce:/dev/st0
103 RMT_IRIXTAPE_DEV=snort:/dev/tape
108 SCRATCH_DEV=/dev/sda9
109 SCRATCH_MNT=/mnt/xfs0
114 SCRATCH_DEV=/dev/sda7
115 SCRATCH_MNT=/mnt/xfs1
117 RMT_TAPE_DEV=sagan:/dev/st0
118 RMT_IRIXTAPE_DEV=snort:/dev/tape
122 TEST_DEV=/dev/xfs_test
123 TEST_DIR=/mnt/xfs_test
124 SCRATCH_DEV=/dev/xfs_scratch
125 SCRATCH_MNT=/mnt/xfs_scratch
126 SCRATCH_LOGDEV=/dev/xfs_log
131 SCRATCH_DEV=/dev/hdb14
132 SCRATCH_MNT=/mnt/scratch
133 SCRATCH_RTDEV=/dev/hdb15
134 SCRATCH_LOGDEV=/dev/hdb16
139 SCRATCH_DEV=/dev/hda2
144 TEST_DIR=/mnt/scratch_0
145 SCRATCH_DEV=/dev/sdc7
146 SCRATCH_MNT=/mnt/scratch_2
151 SCRATCH_DEV=/dev/hda9
153 SCRATCH_LOGDEV=/dev/hda10
154 SCRATCH_RTDEV=/dev/hda11
159 SCRATCH_DEV=/dev/sda8
160 SCRATCH_MNT=/mnt/xfs1
161 SCRATCH_LOGDEV=/dev/sda9
166 SCRATCH_DEV=/dev/hda8
167 SCRATCH_MNT=/mnt/xfs0
168 SCRATCH_LOGDEV=/dev/hda10
170 RMT_TAPE_DEV=fuzzy:/dev/st0
171 RMT_IRIXTAPE_DEV=blub:/dev/tape
176 echo "common.config: Error: need to define parameters for host `hostname -s`"
181 if [ ! -b "$TEST_DEV" ]
183 echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device"
187 if [ ! -d "$TEST_DIR" ]
189 echo "common.config: Error: \$TEST_DIR ($TEST_DIR) is not a directory"
193 if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" ]
195 echo "common.config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device"
199 if [ ! -z "$SCRATCH_DEV" -a ! -d "$SCRATCH_MNT" ]
201 echo "common.config: Error: \$SCRATCH_MNT ($SCRATCH_MNT) is not a directory"
205 # if devfs is running expand the full /dev/.. pathname - this is what will be
206 # returned by utilities such as mount
207 [ -L "$TEST_DEV" ] && TEST_DEV=`_readlink $TEST_DEV`
208 [ -L "$SCRATCH_DEV" ] && SCRATCH_DEV=`_readlink $SCRATCH_DEV`
209 [ -L "$SCRATCH_LOGDEV" ] && SCRATCH_LOGDEV=`_readlink $SCRATCH_LOGDEV`
210 [ -L "$SCRATCH_RTDEV" ] && SCRATCH_RTDEV=`_readlink $SCRATCH_LOGDEV`
212 # make sure this script returns success