1# 2# CDDL HEADER START 3# 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. 7# 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. 12# 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] 18# 19# CDDL HEADER END 20# 21 22# 23# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26 27# 28# Copyright (c) 2012, 2015 by Delphix. All rights reserved. 29# 30 31. $STF_SUITE/include/libtest.shlib 32 33export DISK_ARRAY_NUM=0 34export DISK_ARRAY_LIMIT=4 35export DISKSARRAY="" 36 37function set_disks 38{ 39 typeset -a disk_array=($(find_disks $DISKS)) 40 41 if (( ${#disk_array[*]} <= 1 )); then 42 export DISK=${DISKS%% *} 43 else 44 export DISK="" 45 typeset -i i=0 46 while (( i < ${#disk_array[*]} )); do 47 export DISK${i}="${disk_array[$i]}" 48 DISKSARRAY="$DISKSARRAY ${disk_array[$i]}" 49 (( i = i + 1 )) 50 (( i>$DISK_ARRAY_LIMIT )) && break 51 done 52 export DISK_ARRAY_NUM=$i 53 export DISKSARRAY 54 fi 55} 56 57set_disks 58 59export FILESIZE="$MINVDEVSIZE" 60export FILESIZE1="$(($MINVDEVSIZE * 2))" 61export SIZE="$((MINVDEVSIZE / (1024 * 1024)))"m 62export SIZE1="$(($MINVDEVSIZE * 2 / (1024 * 1024)))m" 63export SLICE0=0 64export SLICE1=1 65export SLICE2=2 66export SLICE3=3 67export SLICE4=4 68export SLICE5=5 69export SLICE6=6 70export SLICE7=7 71 72export FILEDISK=filedisk_create 73export FILEDISK0=filedisk0_create 74export FILEDISK1=filedisk1_create 75export FILEDISK2=filedisk2_create 76export FILEDISK3=filedisk3_create 77 78export BYND_MAX_NAME="byondmaxnamelength\ 79012345678901234567890123456789\ 80012345678901234567890123456789\ 81012345678901234567890123456789\ 82012345678901234567890123456789\ 83012345678901234567890123456789\ 84012345678901234567890123456789\ 85012345678901234567890123456789\ 86012345678901234567890123456789" 87 88export TOOSMALL="toosmall" 89 90export TESTPOOL4=testpool4.create 91export TESTPOOL5=testpool5.create 92export TESTPOOL6=testpool6.create 93 94export CPATH="/var/tmp/cachefile.create" 95