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