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) 2013, 2016 by Delphix. All rights reserved.
31 . $STF_SUITE/include/libtest.shlib
33 set -A disk_array $(find_disks $DISKS)
34 case "${#disk_array[*]}" in
39 # We need to repartition the single disk to two slices.
41 ZFS_DISK=${disk_array[0]}
44 ZFSSIDE_DISK=${SINGLE_DISK}s0
45 NONZFSSIDE_DISK=${SINGLE_DISK}s1
48 # In this case there are at least enough disks to use.
50 ZFS_DISK=${disk_array[0]}
51 NONZFS_DISK=${disk_array[1]}
52 ZFSSIDE_DISK=${ZFS_DISK}s0
53 NONZFSSIDE_DISK=${NONZFS_DISK}s0
57 export DISK_COUNT ZFS_DISK NONZFS_DISK SINGLE_DISK ZFSSIDE_DISK NONZFSSIDE_DISK
59 export TESTFILE=/etc/passwd
60 export NONZFS_TESTDIR=$TESTDIR/nonzfstestdir
62 export SUMA=`echo $tmp | awk '{print $1}'`
63 export SUMB=`echo $tmp | awk '{print $2}'`
65 export BNAME=`basename $TESTFILE`
66 export DNAME=`dirname $TESTFILE`