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