]> git.proxmox.com Git - mirror_zfs-debian.git/blame - tests/zfs-tests/include/default.cfg
New upstream version 0.7.4
[mirror_zfs-debian.git] / tests / zfs-tests / include / default.cfg
CommitLineData
cae5b340
AX
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# Copyright (c) 2017 Lawrence Livermore National Security, LLC.
30#
31
32. $STF_SUITE/include/commands.cfg
33. $STF_SUITE/include/libtest.shlib
34
35# ZFS Directories
36export prefix=/usr/local
37export exec_prefix=${prefix}
38export ZEDLET_ETC_DIR=${ZEDLET_ETC_DIR:-${prefix}/etc/zfs/zed.d}
39export ZEDLET_LIBEXEC_DIR=${ZEDLET_LIBEXEC_DIR:-${exec_prefix}/libexec/zfs/zed.d}
40export ZPOOL_SCRIPT_DIR=${ZPOOL_SCRIPT_DIR:-${prefix}/etc/zfs/zpool.d}
41
42# Define run length constants
43export RT_LONG="3"
44export RT_MEDIUM="2"
45export RT_SHORT="1"
46
47# Define macro for zone test
48export ZONE_POOL="zonepool"
49export ZONE_CTR="zonectr"
50
51# ensure we're running in the C locale, since
52# localised messages may result in test failures
53export LC_ALL="C"
54export LANG="C"
55
56#
57# pattern to ignore from 'zpool list'.
58#
59export NO_POOLS="no pools available"
60
61# pattern to ignore from 'zfs list'.
62export NO_DATASETS="no datasets available"
63
64export TEST_BASE_DIR="/var/tmp"
65
66# Default to compression ON
67export COMPRESSION_PROP=on
68
69# Default to using the checksum
70export CHECKSUM_PROP=on
71
72# some common variables used by test scripts :
73export FIO_SCRIPTS=$STF_SUITE/tests/perf/fio
74export PERF_SCRIPTS=$STF_SUITE/tests/perf/scripts
75
76# some test pool names
77export TESTPOOL=testpool
78export TESTPOOL1=testpool1
79export TESTPOOL2=testpool2
80export TESTPOOL3=testpool3
81export PERFPOOL=perfpool
82
83# some test file system names
84export TESTFS=testfs
85export TESTFS1=testfs1
86export TESTFS2=testfs2
87export TESTFS3=testfs3
88
89# some test directory names
90export TESTDIR=${TEST_BASE_DIR%%/}/testdir
91export TESTDIR0=${TEST_BASE_DIR%%/}/testdir0
92export TESTDIR1=${TEST_BASE_DIR%%/}/testdir1
93export TESTDIR2=${TEST_BASE_DIR%%/}/testdir2
94
95# some test sub file system names
96export TESTSUBFS=subfs
97export TESTSUBFS1=subfs1
98export TESTSUBFS2=subfs2
99
100# some temp files
101export TEMPFILE=${TEST_BASE_DIR%%/}/tempfile$$
102export TEMPFILE0=${TEST_BASE_DIR%%/}/tempfile0$$
103export TEMPFILE1=${TEST_BASE_DIR%%/}/tempfile1$$
104export TEMPFILE2=${TEST_BASE_DIR%%/}/tempfile2$$
105
106export ZFSROOT=
107
108export TESTSNAP=testsnap
109export TESTSNAP1=testsnap1
110export TESTSNAP2=testsnap2
111export TESTCLONE=testclone
112export TESTCLONE1=testclone1
113export TESTCLONE2=testclone2
114export TESTCLCT=testclct
115export TESTCTR=testctr
116export TESTCTR1=testctr1
117export TESTCTR2=testctr2
118export TESTVOL=testvol
119export TESTVOL1=testvol1
120export TESTVOL2=testvol2
121export TESTFILE0=testfile0
122export TESTFILE1=testfile1
123export TESTFILE2=testfile2
124export TESTBKMARK=testbkmark
125
126export LONGPNAME="poolname50charslong_012345678901234567890123456789"
127export LONGFSNAME="fsysname50charslong_012345678901234567890123456789"
128export SNAPFS="$TESTPOOL/$TESTFS@$TESTSNAP"
129export SNAPFS1="$TESTPOOL/$TESTVOL@$TESTSNAP"
130
131export VOLSIZE=150m
132export BIGVOLSIZE=1eb
133
134# Default to limit disks to be checked
135export MAX_FINDDISKSNUM=6
136
137# Default minimum size for file based vdevs in the test suite
138export MINVDEVSIZE=$((256 * 1024 * 1024))
139
140# Minimum vdev size possible as defined in the OS
141export SPA_MINDEVSIZE=$((64 * 1024 * 1024))
142
143# For iscsi target support
144export ISCSITGTFILE=/tmp/iscsitgt_file
145export ISCSITGT_FMRI=svc:/system/iscsitgt:default
146if ! is_linux; then
147export AUTO_SNAP=$(svcs -a | grep auto-snapshot | grep online | awk \
148 '{print $3}')
149fi
150
151#
152# finally, if we're running in a local zone
153# we take some additional actions
154if ! is_global_zone; then
155 reexport_pool
156fi
157
158export ZFS_VERSION=5
159export ZFS_ALL_VERSIONS="1 2 3 4 5"
160
161for i in $ZFS_ALL_VERSIONS; do
162 eval 'export ZFS_VERSION_$i="v${i}-fs"'
163done
164
165export MAX_PARTITIONS=8
166
167if is_linux; then
168 unpack_opts="--sparse -xf"
169 pack_opts="--sparse -cf"
170 verbose=" -v"
171 unpack_preserve=" -xpf"
172 pack_preserve=" -cpf"
173
174 ZVOL_DEVDIR="/dev/zvol"
175 ZVOL_RDEVDIR="/dev/zvol"
176 DEV_RDSKDIR="/dev"
177 DEV_MPATHDIR="/dev/mapper"
178
179 ZEDLET_DIR="/var/tmp/zed"
41d74433
AX
180 ZED_LOG="$ZEDLET_DIR/zed.log"
181 ZED_DEBUG_LOG="$ZEDLET_DIR/zed.debug.log"
cae5b340
AX
182 VDEVID_CONF="$ZEDLET_DIR/vdev_id.conf"
183 VDEVID_CONF_ETC="/etc/zfs/vdev_id.conf"
184
185
186 NEWFS_DEFAULT_FS="ext2"
187else
188 unpack_opts="xv"
189 pack_opts="cf"
190 verbose="v"
191 unpack_preserve="xpf"
192 pack_preserve="cpf"
193
194 ZVOL_DEVDIR="/dev/zvol/dsk"
195 ZVOL_RDEVDIR="/dev/zvol/rdsk"
196 DEV_DSKDIR="/dev/dsk"
197 DEV_RDSKDIR="/dev/rdsk"
198
199 NEWFS_DEFAULT_FS="ufs"
200fi
201export unpack_opts pack_opts verbose unpack_preserve pack_preserve \
202 ZVOL_DEVDIR ZVOL_RDEVDIR NEWFS_DEFAULT_FS DEV_RDSKDIR DEV_MPATHDIR \
41d74433 203 ZEDLET_DIR ZED_LOG ZED_DEBUG_LOG VDEVID_CONF VDEVID_CONF_ETC