summaryrefslogtreecommitdiff
path: root/common.config
blob: 269e6b0b0582eeccd00afa5acb7d9a0b3484650d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
##/bin/sh

#
# Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
# 
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
# 
# This program is distributed in the hope that it would be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# 
# Further, this software is distributed without any warranty that it is
# free of the rightful claim of any third person regarding infringement
# or the like.  Any license provided herein, whether implied or
# otherwise, applies only to this software file.  Patent licenses, if
# any, provided herein do not apply to combinations of this program with
# other software, or any other product whatsoever.
# 
# You should have received a copy of the GNU General Public License along
# with this program; if not, write the Free Software Foundation, Inc., 59
# Temple Place - Suite 330, Boston MA 02111-1307, USA.
# 
# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
# Mountain View, CA  94043, or:
# 
# http://www.sgi.com 
# 
# For further information regarding this notice, see: 
# 
# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
#

#
# setup and check for config parameters, and in particular
#
# TEST_DIR		- scratch test directory that is in an already
#		  	  mounted XFS file system, needs to be be world
#			  writeable
# TEST_DEV		- device for file system containing TEST_DIR
# SCRATCH_DEV	        - device you can make a scratch file system on
# SCRATCH_MNT	        - mount point for scratch file system
# 
# and optionally:
# SCRATCH_LOGDEV	- scratch log device for external log testing
# SCRATCH_RTDEV	        - scratch rt dev (only for testing cmds currently)
# TAPE_DEV		- the tape device for the xfsdump tests
# RMT_TAPE_DEV		- the remote tape device for the xfsdump tests
# RMT_IRIXTAPE_DEV	- the IRIX remote tape device for the xfsdump tests
# RMT_TAPE_USER		- remote user for tape device
#

#
# - This script is shared by the stress test system and the auto-qa
#   system (includes both regression test and benchmark components).
# - TEST_DEV & TEST_DIR must be assigned.
# - this script shouldn't make any assertions about filesystem
#   validity or mountedness.
#

HOST=`hostname -s`
MODULAR=0		# using XFS as a module or not
BOOT="/boot"		# install target for kernels
export EXTRA=${EXTRA:=-xfs-qa}

# general parameters (mainly for auto-qa)
SOAK_PROC=3		# -p option to fsstress
SOAK_STRESS=10000	# -n option to fsstress
SOAK_PASSES=-1		# count of repetitions of fsstress (while soaking)
BENCH_PASSES=5		# count of repetitions of benchmarks (want averages)
EMAIL=root@localhost	# where auto-qa will send its status messages
export MKFS_OPTIONS=${MKFS_OPTIONS:=-bsize=4096}
export MOUNT_OPTIONS=${MOUNT_OPTIONS:=-ologbufs=2}
export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}

case "$HOST"
in
    bruce)
	MODULAR=0
	EMAIL="nathans@larry"
        TEST_DEV=/dev/sda10
	TEST_DIR=/mnt/xfs1
	SCRATCH_DEV=/dev/sda9
	SCRATCH_MNT=/mnt/xfs0
	SCRATCH_LOGDEV=/dev/sda11
	TAPE_DEV=/dev/st0
	RMT_TAPE_DEV=bruce:/dev/st0
	RMT_IRIXTAPE_DEV=snort:/dev/tape
	RMT_TAPE_USER=guest
	;;
    sherman)
	TEST_DEV=/dev/sda10
	TEST_DIR=/mnt/xfs1
	SCRATCH_DEV=/dev/sda9
	SCRATCH_MNT=/mnt/xfs0
        ;;
    sagan)
	MODULAR=1
	EMAIL="tes@larry"
        TEST_DEV=/dev/sda6
	TEST_DIR=/mnt/xfs0
	SCRATCH_DEV=/dev/sda7
	SCRATCH_MNT=/mnt/xfs1
	TAPE_DEV=/dev/st0
	RMT_TAPE_DEV=sagan:/dev/st0
	RMT_IRIXTAPE_DEV=snort:/dev/tape
	RMT_TAPE_USER=guest
	;;
    frodo)
	MODULAR=0
	EMAIL="nathans@larry"
        TEST_DEV=/dev/hda6
	TEST_DIR=/mnt/test
        SCRATCH_DEV=/dev/hda7
	SCRATCH_MNT=/mnt/scratch
	;;
    troppo)
	MODULAR=0
	EMAIL="kaos@larry"
	TEST_DEV=/dev/hdb13
	TEST_DIR=/mnt/test
	SCRATCH_DEV=/dev/hdb14
	SCRATCH_MNT=/mnt/scratch
	SCRATCH_LOGDEV=/dev/hdb15
	;;
    lord)
	TEST_DIR=/xfs
	TEST_DEV=/dev/sda5
	SCRATCH_DEV=/dev/hda7
	SCRATCH_LOGDEV=/dev/sda6
	SCRATCH_MNT=/xfs1
	;;
    burst)
	TEST_DIR=/xfs
	TEST_DEV=/dev/hda3
	SCRATCH_DEV=/dev/hda7
	SCRATCH_MNT=/scratch
	;;
    lumpy)
	TEST_DEV=/dev/sdc5
	TEST_DIR=/mnt/scratch_0
	SCRATCH_DEV=/dev/sdc7
	SCRATCH_MNT=/mnt/scratch_2
	;;
    bongo)
	TEST_DEV=/dev/hda8
	TEST_DIR=/xfs1
	SCRATCH_DEV=/dev/hda9
	SCRATCH_MNT=/xfs2
	SCRATCH_LOGDEV=/dev/hda10
	SCRATCH_RTDEV=/dev/hda11
	;;
    surly)
        TEST_DEV=/dev/hda9
	TEST_DIR=/mnt/xfs1
	SCRATCH_DEV=/dev/hda8
	SCRATCH_MNT=/mnt/xfs0
	SCRATCH_LOGDEV=/dev/hda10
	TAPE_DEV=/dev/st0
	RMT_TAPE_DEV=fuzzy:/dev/st0
	RMT_IRIXTAPE_DEV=blub:/dev/tape
	RMT_TAPE_USER=guest
	;;
    permit)
	TEST_DEV=/dev/sdc1
	TEST_DIR=/mnt/xfs0
	SCRATCH_DEV=/dev/sdd1
	SCRATCH_MNT=/mnt/xfs1
	;;
    indra)
    	TEST_DEV=/dev/sdb1
	TEST_DIR=/mnt/xfs0
	SCRATCH_DEV=/dev/sdb2
	SCRATCH_MNT=/mnt/xfs1
	;;
    usermode)
    	TEST_DEV=/dev/ubd/1
	TEST_DIR=/mnt/test
	SCRATCH_DEV=/dev/ubd/2
	SCRATCH_MNT=/mnt/scratch
	SCRATCH_RTDEV=/dev/ubd/3
	SCRATCH_LOGDEV=/dev/ubd/4
	;;
    lite)
	TEST_DEV=/dev/sda1
	TEST_DIR=/mnt/sda1
	SCRATCH_DEV=/dev/sda2
	SCRATCH_MNT=/mnt/sda2
	SCRATCH_LOGDEV=/dev/sda3
	;;
    dmfnt2)
        TEST_DEV=/dev/sda6
	TEST_DIR=/mnt/test
	SCRATCH_DEV=/dev/sdc6
	SCRATCH_MNT=/mnt/scratch
	TAPE_DEV=/dev/st0
	RMT_TAPE_DEV=longhorn:/dev/tape
#	RMT_IRIXTAPE_DEV=longhorn:/dev/tape
	RMT_TAPE_USER=guest
	;;
    *)
	echo "common.config: Error: need to define parameters for host $HOST"
	exit 1
	;;
esac

if [ ! -b "$TEST_DEV" ]
then
    echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device"
    exit 1
fi

if [ ! -d "$TEST_DIR" ]
then
    echo "common.config: Error: \$TEST_DIR ($TEST_DIR) is not a directory"
    exit 1
fi

if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" ]
then
    echo "common.config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device"
    exit 1
fi

if [ ! -z "$SCRATCH_DEV" -a ! -d "$SCRATCH_MNT" ]
then
    echo "common.config: Error: \$SCRATCH_MNT ($SCRATCH_MNT) is not a directory"
    exit 1
fi

_readlink()
{
    if [ $# -ne 1 ]
    then
	echo "Usage: _readlink filename" 1>&2
	exit 1
    fi

    perl -e "\$in=\"$1\";" -e '
	$lnk = readlink($in);
	if ($lnk =~ m!^/.*!) {
	  print "$lnk\n";
	}
	else {
	  chomp($dir = `dirname $in`);
	  print "$dir/$lnk\n";
	}'
}

# if devfs is running expand the full /dev/.. pathname - this is what will be
# returned by utilities such as mount
[ -L "$TEST_DEV" ] && TEST_DEV=`_readlink $TEST_DEV`
[ -L "$SCRATCH_DEV" ] && SCRATCH_DEV=`_readlink $SCRATCH_DEV`
[ -L "$SCRATCH_LOGDEV" ] && SCRATCH_LOGDEV=`_readlink $SCRATCH_LOGDEV`
[ -L "$SCRATCH_RTDEV" ] && SCRATCH_RTDEV=`_readlink $SCRATCH_LOGDEV`

# make sure this script returns success
/bin/true