xref: /freebsd/tests/sys/cddl/zfs/tests/inuse/inuse.cfg (revision d0b2dbfa)
1# vim: filetype=sh
2#
3# CDDL HEADER START
4#
5# The contents of this file are subject to the terms of the
6# Common Development and Distribution License (the "License").
7# You may not use this file except in compliance with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22
23#
24# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# ident	"@(#)inuse.cfg	1.7	09/05/19 SMI"
28#
29
30. $STF_SUITE/include/libtest.kshlib
31
32verify_disk_count "$DISKS" 2
33set -A disk_array $(find_disks $DISKS)
34case "${#disk_array[@]}" in
352)
36	FS_DISK0=${disk_array[0]}
37	FS_DISK1=${disk_array[1]}
38	FS_DISK2=${disk_array[0]}
39	FS_DISK3=${disk_array[1]}
40	FS_SIDE0=${FS_DISK0}p1
41	FS_SIDE1=${FS_DISK0}p2
42	FS_SIDE2=${FS_DISK1}p1
43	FS_SIDE3=${FS_DISK1}p2
44	disk0="$FS_SIDE0"
45	disk1="$FS_SIDE1"
46	disk2="$FS_SIDE2"
47	disk3="$FS_SIDE3"
48	disktargets="$disk0 $disk2"
49	rawdisk0="$FS_SIDE0"
50	rawdisk1="$FS_SIDE1"
51	rawdisk2="$FS_SIDE2"
52	rawdisk3="$FS_SIDE3"
53	rawtargets="$rawdisk0 $rawdisk2"
54	vdisks="$FS_DISK0"
55	sdisks="$FS_DISK1"
56	vslices="$FS_SIDE0 $FS_SIDE1 $FS_SIDE2"
57	sslices="$FS_SIDE3"
58	;;
593)
60	FS_DISK0=${disk_array[0]}
61	FS_DISK1=${disk_array[1]}
62	FS_DISK2=${disk_array[2]}
63	FS_DISK3=${disk_array[0]}
64	FS_SIDE0=${FS_DISK0}p1
65	FS_SIDE1=${FS_DISK0}p2
66	FS_SIDE2=${FS_DISK1}p1
67	FS_SIDE3=${FS_DISK2}p1
68	disk0="$FS_SIDE0"
69	disk1="$FS_SIDE1"
70	disk2="$FS_SIDE2"
71	disk3="$FS_SIDE3"
72	disktargets="$disk0 $disk2 $disk3"
73	rawdisk0="$FS_SIDE0"
74	rawdisk1="$FS_SIDE1"
75	rawdisk2="$FS_SIDE2"
76	rawdisk3="$FS_SIDE3"
77	rawtargets="$rawdisk0 $rawdisk2 $rawdisk3"
78	vdisks="$FS_DISK0 $FS_DISK1"
79	sdisks="$FS_DISK2"
80	vslices="$FS_SIDE0 $FS_SIDE2 $FS_SIDE3"
81	sslices="$FS_SIDE1"
82	;;
83*)
84	FS_DISK0=${disk_array[0]}
85	FS_DISK1=${disk_array[1]}
86	FS_DISK2=${disk_array[2]}
87	FS_DISK3=${disk_array[3]}
88	FS_SIDE0=${FS_DISK0}p1
89	FS_SIDE1=${FS_DISK1}p1
90	FS_SIDE2=${FS_DISK2}p1
91	FS_SIDE3=${FS_DISK3}p1
92	disk0="$FS_SIDE0"
93	disk1="$FS_SIDE1"
94	disk2="$FS_SIDE2"
95	disk3="$FS_SIDE3"
96	disktargets="$disk0 $disk1 $disk2 $disk3"
97	rawdisk0="$FS_SIDE0"
98	rawdisk1="$FS_SIDE1"
99	rawdisk2="$FS_SIDE2"
100	rawdisk3="$FS_SIDE3"
101	rawtargets="$rawdisk0 $rawdisk1 $rawdisk2 $rawdisk3"
102	vdisks="$FS_DISK0 $FS_DISK1 $FS_DISK2"
103	sdisks="$FS_DISK3"
104	vslices="$FS_SIDE0 $FS_SIDE1 $FS_SIDE2"
105	sslices="$FS_SIDE3"
106	;;
107esac
108
109export FS_DISK0 FS_DISK1 FS_DISK2 FS_DISK3 SINGLE_DISK
110export FS_SIDE0 FS_SIDE1 FS_SIDE2 FS_SIDE3
111export disk0 disk1 disk2 disk3 disktargets
112export rawdisk0 rawdisk1 rawdisk2 rawdisk3 rawtargets
113export vdisks sdisks vslices sslices
114
115export UFSMP=$TESTDIR/testinuseufsdump
116export FS_SIZE=1g
117export PREVDUMPDEV=""
118export PIDUFSDUMP=""
119export PIDUFSRESTORE=""
120# size of block to be written to test file - currently 1mb
121export BLOCK_SIZE=$(( 1024 * 1024 ))
122# number of blocks to write == size of file
123export BLOCK_COUNT=100
124export STF_TIMEOUT=1200			# 20 minutes max.
125