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) 2016 by Delphix. All rights reserved.
29 # Copyright (c) 2017 Lawrence Livermore National Security, LLC.
32 . $STF_SUITE/include/commands.cfg
33 . $STF_SUITE/include/libtest.shlib
36 export prefix=@prefix@
37 export exec_prefix=@exec_prefix@
38 export ZEDLET_ETC_DIR=${ZEDLET_ETC_DIR:-@sysconfdir@/zfs/zed.d}
39 export ZEDLET_LIBEXEC_DIR=${ZEDLET_LIBEXEC_DIR:-@libexecdir@/zfs/zed.d}
40 export ZPOOL_SCRIPT_DIR=${ZPOOL_SCRIPT_DIR:-@sysconfdir@/zfs/zpool.d}
42 # Define run length constants
47 # Define macro for zone test
48 export ZONE_POOL="zonepool"
49 export ZONE_CTR="zonectr"
51 # ensure we're running in the C locale, since
52 # localised messages may result in test failures
57 # pattern to ignore from 'zpool list'.
59 export NO_POOLS="no pools available"
61 # pattern to ignore from 'zfs list'.
62 export NO_DATASETS="no datasets available"
64 export TEST_BASE_DIR="/var/tmp"
66 # Default to compression ON
67 export COMPRESSION_PROP=on
69 # Default to using the checksum
70 export CHECKSUM_PROP=on
72 # some common variables used by test scripts :
73 export FIO_SCRIPTS=$STF_SUITE/tests/perf/fio
74 export PERF_SCRIPTS=$STF_SUITE/tests/perf/scripts
76 # some test pool names
77 export TESTPOOL=testpool
78 export TESTPOOL1=testpool1
79 export TESTPOOL2=testpool2
80 export TESTPOOL3=testpool3
81 export PERFPOOL=perfpool
83 # some test file system names
85 export TESTFS1=testfs1
86 export TESTFS2=testfs2
87 export TESTFS3=testfs3
89 # some test directory names
90 export TESTDIR=${TEST_BASE_DIR%%/}/testdir
91 export TESTDIR0=${TEST_BASE_DIR%%/}/testdir0
92 export TESTDIR1=${TEST_BASE_DIR%%/}/testdir1
93 export TESTDIR2=${TEST_BASE_DIR%%/}/testdir2
95 # some test sub file system names
96 export TESTSUBFS=subfs
97 export TESTSUBFS1=subfs1
98 export TESTSUBFS2=subfs2
101 export TEMPFILE=${TEST_BASE_DIR%%/}/tempfile$$
102 export TEMPFILE0=${TEST_BASE_DIR%%/}/tempfile0$$
103 export TEMPFILE1=${TEST_BASE_DIR%%/}/tempfile1$$
104 export TEMPFILE2=${TEST_BASE_DIR%%/}/tempfile2$$
108 export TESTSNAP=testsnap
109 export TESTSNAP1=testsnap1
110 export TESTSNAP2=testsnap2
111 export TESTCLONE=testclone
112 export TESTCLONE1=testclone1
113 export TESTCLONE2=testclone2
114 export TESTCLCT=testclct
115 export TESTCTR=testctr
116 export TESTCTR1=testctr1
117 export TESTCTR2=testctr2
118 export TESTVOL=testvol
119 export TESTVOL1=testvol1
120 export TESTVOL2=testvol2
121 export TESTFILE0=testfile0
122 export TESTFILE1=testfile1
123 export TESTFILE2=testfile2
124 export TESTBKMARK=testbkmark
126 export LONGPNAME="poolname50charslong_012345678901234567890123456789"
127 export LONGFSNAME="fsysname50charslong_012345678901234567890123456789"
128 export SNAPFS="$TESTPOOL/$TESTFS@$TESTSNAP"
129 export SNAPFS1="$TESTPOOL/$TESTVOL@$TESTSNAP"
132 export BIGVOLSIZE=1eb
134 # Default to limit disks to be checked
135 export MAX_FINDDISKSNUM=6
137 # Default minimum size for file based vdevs in the test suite
138 export MINVDEVSIZE=$((256 * 1024 * 1024))
140 # Minimum vdev size possible as defined in the OS
141 export SPA_MINDEVSIZE=$((64 * 1024 * 1024))
143 # For iscsi target support
144 export ISCSITGTFILE=/tmp/iscsitgt_file
145 export ISCSITGT_FMRI=svc:/system/iscsitgt:default
147 export AUTO_SNAP=$(svcs -a | grep auto-snapshot | grep online | awk \
152 # finally, if we're running in a local zone
153 # we take some additional actions
154 if ! is_global_zone; then
159 export ZFS_ALL_VERSIONS="1 2 3 4 5"
161 for i in $ZFS_ALL_VERSIONS; do
162 eval 'export ZFS_VERSION_$i="v${i}-fs"'
165 export MAX_PARTITIONS=8
168 unpack_opts="--sparse -xf"
169 pack_opts="--sparse -cf"
171 unpack_preserve=" -xpf"
172 pack_preserve=" -cpf"
174 ZVOL_DEVDIR="/dev/zvol"
175 ZVOL_RDEVDIR="/dev/zvol"
177 DEV_MPATHDIR="/dev/mapper"
179 ZEDLET_DIR="/var/tmp/zed"
180 VDEVID_CONF="$ZEDLET_DIR/vdev_id.conf"
181 VDEVID_CONF_ETC="/etc/zfs/vdev_id.conf"
184 NEWFS_DEFAULT_FS="ext2"
189 unpack_preserve="xpf"
192 ZVOL_DEVDIR="/dev/zvol/dsk"
193 ZVOL_RDEVDIR="/dev/zvol/rdsk"
194 DEV_DSKDIR="/dev/dsk"
195 DEV_RDSKDIR="/dev/rdsk"
197 NEWFS_DEFAULT_FS="ufs"
199 export unpack_opts pack_opts verbose unpack_preserve pack_preserve \
200 ZVOL_DEVDIR ZVOL_RDEVDIR NEWFS_DEFAULT_FS DEV_RDSKDIR DEV_MPATHDIR \
201 ZEDLET_DIR VDEVID_CONF VDEVID_CONF_ETC