xref: /freebsd/tests/sys/cddl/zfs/tests/migration/migration.cfg (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
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 2008 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26
27. $STF_SUITE/include/libtest.kshlib
28
29set -A disk_array $(find_disks $DISKS)
30case "${#disk_array[*]}" in
310)
32	DISK_COUNT=0
33	;;
341)
35	# We need to repartition the single disk to two partitions.
36	DISK_COUNT=1
37	ZFS_DISK=${disk_array[0]}
38	SINGLE_DISK=$ZFS_DISK
39	NONZFS_DISK=$ZFS_DISK
40	ZFSSIDE_DISK=${SINGLE_DISK}p1
41	NONZFSSIDE_DISK=${SINGLE_DISK}p2
42	;;
43*)
44	# In this case there are at least enough disks to use.
45	DISK_COUNT=2
46	ZFS_DISK=${disk_array[0]}
47	NONZFS_DISK=${disk_array[1]}
48	ZFSSIDE_DISK=${ZFS_DISK}p1
49	NONZFSSIDE_DISK=${NONZFS_DISK}p1
50	;;
51esac
52
53export DISK_COUNT ZFS_DISK NONZFS_DISK SINGLE_DISK ZFSSIDE_DISK NONZFSSIDE_DISK
54
55export TESTFILE=/etc/passwd
56export NONZFS_TESTDIR=$TESTDIR/nonzfstestdir${TESTCASE_ID}
57tmp=`$SUM $TESTFILE`
58export SUMA=`$ECHO $tmp | $AWK '{print $1}'`
59export SUMB=`$ECHO $tmp | $AWK '{print $2}'`
60export FS_SIZE=1g
61export BNAME=`$BASENAME $TESTFILE`
62export DNAME=`$DIRNAME $TESTFILE`
63