xref: /freebsd/tests/sys/cddl/zfs/tests/migration/migration.cfg (revision 22cf89c938886d14f5796fc49f9f020c23ea8eaf)
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# ident	"@(#)migration.cfg	1.3	08/08/15 SMI"
28#
29
30. $STF_SUITE/include/libtest.kshlib
31
32set -A disk_array $(find_disks $DISKS)
33case "${#disk_array[*]}" in
340)
35	DISK_COUNT=0
36	;;
371)
38	# We need to repartition the single disk to two partitions.
39	DISK_COUNT=1
40	ZFS_DISK=${disk_array[0]}
41	SINGLE_DISK=$ZFS_DISK
42	NONZFS_DISK=$ZFS_DISK
43	ZFSSIDE_DISK=${SINGLE_DISK}p1
44	NONZFSSIDE_DISK=${SINGLE_DISK}p2
45	;;
46*)
47	# In this case there are at least enough disks to use.
48	DISK_COUNT=2
49	ZFS_DISK=${disk_array[0]}
50	NONZFS_DISK=${disk_array[1]}
51	ZFSSIDE_DISK=${ZFS_DISK}p1
52	NONZFSSIDE_DISK=${NONZFS_DISK}p1
53	;;
54esac
55
56export DISK_COUNT ZFS_DISK NONZFS_DISK SINGLE_DISK ZFSSIDE_DISK NONZFSSIDE_DISK
57
58export TESTFILE=/etc/passwd
59export NONZFS_TESTDIR=$TESTDIR/nonzfstestdir${TESTCASE_ID}
60tmp=`$SUM $TESTFILE`
61export SUMA=`$ECHO $tmp | $AWK '{print $1}'`
62export SUMB=`$ECHO $tmp | $AWK '{print $2}'`
63export FS_SIZE=1g
64export BNAME=`$BASENAME $TESTFILE`
65export DNAME=`$DIRNAME $TESTFILE`
66