]> git.proxmox.com Git - mirror_zfs.git/blob - tests/zfs-tests/include/default.cfg.in
d6913f1f3a3eea2a592875fad3bb8c70123236c2
[mirror_zfs.git] / tests / zfs-tests / include / default.cfg.in
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) 2016 by Delphix. All rights reserved.
29 #
30
31 . $STF_SUITE/include/commands.cfg
32
33 # Common paths
34 bindir=@bindir@
35 sbindir=@sbindir@
36
37 # ZFS Commands
38 export ZDB=${ZDB:-${sbindir}/zdb}
39 export ZFS=${ZFS:-${sbindir}/zfs}
40 export ZHACK=${ZHACK:-${sbindir}/zhack}
41 export ZINJECT=${ZINJECT:-${sbindir}/zinject}
42 export ZPOOL=${ZPOOL:-${sbindir}/zpool}
43 export ZTEST=${ZTEST:-${sbindir}/ztest}
44 export ZPIOS=${ZPIOS:-${sbindir}/zpios}
45 export RAIDZ_TEST=${RAIDZ_TEST:-${bindir}/raidz_test}
46 export ARC_SUMMARY=${ARC_SUMMARY:-${bindir}/arc_summary.py}
47 export ARCSTAT=${ARCSTAT:-${bindir}/arcstat.py}
48 export DBUFSTAT=${DBUFSTAT:-${bindir}/dbufstat.py}
49
50 . $STF_SUITE/include/libtest.shlib
51
52 # Optionally override the installed ZFS commands to run in-tree
53 if [[ -f "$SRCDIR/zfs-script-config.sh" ]]; then
54 . $SRCDIR/zfs-script-config.sh
55 fi
56
57 # Define run length constants
58 export RT_LONG="3"
59 export RT_MEDIUM="2"
60 export RT_SHORT="1"
61
62 # Define macro for zone test
63 export ZONE_POOL="zonepool"
64 export ZONE_CTR="zonectr"
65
66 # Test Suite Specific Commands
67 helperdir=@datarootdir@/@PACKAGE@/zfs-tests/bin
68 export CHG_USR_EXEC=${CHG_USR_EXEC:-${helperdir}/chg_usr_exec}
69 export DEVNAME2DEVID=${DEVNAME2DEVID:-${helperdir}/devname2devid}
70 export DIR_RD_UPDATE=${DIR_RD_UPDATE:-${helperdir}/dir_rd_update}
71 export FILE_CHECK=${FILE_CHECK:-${helperdir}/file_check}
72 export FILE_TRUNC=${FILE_TRUNC:-${helperdir}/file_trunc}
73 export FILE_WRITE=${FILE_WRITE:-${helperdir}/file_write}
74 export LARGEST_FILE=${LARGEST_FILE:-${helperdir}/largest_file}
75 export MKBUSY=${MKBUSY:-${helperdir}/mkbusy}
76 export MKFILE=${MKFILE:-${helperdir}/mkfile}
77 export MKFILES=${MKFILES:-${helperdir}/mkfiles}
78 export MKTREE=${MKTREE:-${helperdir}/mktree}
79 export MMAP_EXEC=${MMAP_EXEC:-${helperdir}/mmap_exec}
80 export MMAPWRITE=${MMAPWRITE:-${helperdir}/mmapwrite}
81 export RANDFREE_FILE=${RANDFREE_FILE:-${helperdir}/randfree_file}
82 export READMMAP=${READMMAP:-${helperdir}/readmmap}
83 export RENAME_DIR=${RENAME_DIR:-${helperdir}/rename_dir}
84 export RM_LNKCNT_ZERO_FILE=${RM_LNKCNT_ZERO_FILE:-${helperdir}/rm_lnkcnt_zero_file}
85 export THREADSAPPEND=${THREADSAPPEND:-${helperdir}/threadsappend}
86 export XATTRTEST=${XATTRTEST:-${helperdir}/xattrtest}
87
88 # ensure we're running in the C locale, since
89 # localised messages may result in test failures
90 export LC_ALL="C"
91 export LANG="C"
92
93 #
94 # pattern to ignore from 'zpool list'.
95 #
96 export NO_POOLS="no pools available"
97
98 # pattern to ignore from 'zfs list'.
99 export NO_DATASETS="no datasets available"
100
101 export TEST_BASE_DIR="/var/tmp"
102
103 # Default to compression ON
104 export COMPRESSION_PROP=on
105
106 # Default to using the checksum
107 export CHECKSUM_PROP=on
108
109 # some common variables used by test scripts :
110 export FIO_SCRIPTS=$STF_SUITE/tests/perf/fio
111 export PERF_SCRIPTS=$STF_SUITE/tests/perf/scripts
112
113 # some test pool names
114 export TESTPOOL=testpool.$$
115 export TESTPOOL1=testpool1.$$
116 export TESTPOOL2=testpool2.$$
117 export TESTPOOL3=testpool3.$$
118 export PERFPOOL=perfpool
119
120 # some test file system names
121 export TESTFS=testfs.$$
122 export TESTFS1=testfs1.$$
123 export TESTFS2=testfs2.$$
124 export TESTFS3=testfs3.$$
125
126 # some test directory names
127 export TESTDIR=${TEST_BASE_DIR%%/}/testdir$$
128 export TESTDIR0=${TEST_BASE_DIR%%/}/testdir0$$
129 export TESTDIR1=${TEST_BASE_DIR%%/}/testdir1$$
130 export TESTDIR2=${TEST_BASE_DIR%%/}/testdir2$$
131
132 export ZFSROOT=
133
134 export TESTSNAP=testsnap$$
135 export TESTSNAP1=testsnap1$$
136 export TESTSNAP2=testsnap2$$
137 export TESTCLONE=testclone$$
138 export TESTCLONE1=testclone1$$
139 export TESTCLONE2=testclone2$$
140 export TESTCLCT=testclct$$
141 export TESTCTR=testctr$$
142 export TESTCTR1=testctr1$$
143 export TESTCTR2=testctr2$$
144 export TESTVOL=testvol$$
145 export TESTVOL1=testvol1$$
146 export TESTVOL2=testvol2$$
147 export TESTFILE0=testfile0.$$
148 export TESTFILE1=testfile1.$$
149 export TESTFILE2=testfile2.$$
150 export TESTBKMARK=testbkmark$$
151
152 export LONGPNAME="poolname50charslong_012345678901234567890123456789"
153 export LONGFSNAME="fsysname50charslong_012345678901234567890123456789"
154 export SNAPFS="$TESTPOOL/$TESTFS@$TESTSNAP"
155 export SNAPFS1="$TESTPOOL/$TESTVOL@$TESTSNAP"
156
157 export VOLSIZE=150m
158 export BIGVOLSIZE=1eb
159
160 # Default to limit disks to be checked
161 export MAX_FINDDISKSNUM=6
162
163 # For iscsi target support
164 export ISCSITGTFILE=/tmp/iscsitgt_file
165 export ISCSITGT_FMRI=svc:/system/iscsitgt:default
166
167 #
168 # finally, if we're running in a local zone
169 # we take some additional actions
170 if ! is_global_zone; then
171 reexport_pool
172 fi
173
174 export ZFS_VERSION=5
175 export ZFS_ALL_VERSIONS="1 2 3 4 5"
176
177 for i in $ZFS_ALL_VERSIONS; do
178 eval 'export ZFS_VERSION_$i="v${i}-fs"'
179 done
180
181 export MAX_PARTITIONS=8
182
183 if is_linux; then
184 unpack_opts="--sparse -xf"
185 pack_opts="--sparse -cf"
186 verbose=" -v"
187 unpack_preserve=" -xpf"
188 pack_preserve=" -cpf"
189
190 ZVOL_DEVDIR="/dev/zvol"
191 ZVOL_RDEVDIR="/dev/zvol"
192 DEV_RDSKDIR="/dev"
193 DEV_MPATHDIR="/dev/mapper"
194
195 NEWFS_DEFAULT_FS="ext2"
196 else
197 unpack_opts="xv"
198 pack_opts="cf"
199 verbose="v"
200 unpack_preserve="xpf"
201 pack_preserve="cpf"
202
203 ZVOL_DEVDIR="/dev/zvol/dsk"
204 ZVOL_RDEVDIR="/dev/zvol/rdsk"
205 DEV_DSKDIR="/dev/dsk"
206 DEV_RDSKDIR="/dev/rdsk"
207
208 NEWFS_DEFAULT_FS="ufs"
209 fi
210 export unpack_opts pack_opts verbose unpack_preserve pack_preserve \
211 ZVOL_DEVDIR ZVOL_RDEVDIR NEWFS_DEFAULT_FS DEV_RDSKDIR DEV_MPATHDIR