4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
28 # Copyright (c) 2012, 2016 by Delphix. All rights reserved.
31 . $STF_SUITE/include/libtest.shlib
33 typeset -a disk_array=($(find_disks $DISKS))
34 case "${#disk_array[*]}" in
37 # on stf_configure, disk_freelist returns empty.
42 # We need to repartition the single disk to two slices.
44 ZFS_DISK1=${disk_array[0]}
45 ZFSSIDE_DISK1=${ZFS_DISK1}s0
46 ZFS_DISK2=${disk_array[0]}
47 ZFSSIDE_DISK2=${ZFS_DISK2}s1
50 # We need to repartition the single disk to two slices.
52 ZFS_DISK1=${disk_array[0]}
53 ZFSSIDE_DISK1=${ZFS_DISK1}s0
54 ZFS_DISK2=${disk_array[1]}
55 ZFSSIDE_DISK2=${ZFS_DISK2}s0
59 export DISK_COUNT ZFS_DISK1 ZFSSIDE_DISK1 ZFS_DISK2 ZFSSIDE_DISK2
62 export FILE_SIZE=$MINVDEVSIZE
63 export SLICE_SIZE="$((MINVDEVSIZE / (1024 * 1024)))m"
66 export DEVICE_DIR=/dev_import-test
67 export BACKUP_DEVICE_DIR=$DEVICE_DIR/backup
68 export DEVICE_FILE=disk
69 export DEVICE_ARCHIVE=archive_import-test
70 export MYTESTFILE=$STF_SUITE/include/libtest.shlib
72 export CPATH=/var/tmp/cachefile.$$
73 export CPATHBKP=/var/tmp/cachefile.$$.bkp
74 export CPATHBKP2=/var/tmp/cachefile.$$.bkp2
75 export MD5FILE=/var/tmp/md5sums.$$
76 export MD5FILE2=/var/tmp/md5sums.$$.2
79 while (( num < $GROUP_NUM )); do
80 DEVICE_FILES="$DEVICE_FILES ${DEVICE_DIR}/${DEVICE_FILE}$num"
85 export VDEV0=$DEVICE_DIR/${DEVICE_FILE}0
86 export VDEV1=$DEVICE_DIR/${DEVICE_FILE}1
87 export VDEV2=$DEVICE_DIR/${DEVICE_FILE}2
88 export VDEV3=$DEVICE_DIR/${DEVICE_FILE}3
89 export VDEV4=$DEVICE_DIR/${DEVICE_FILE}4
91 export ALTER_ROOT=/alter_import-test