5767 fix several problems with zfs test suite
[unleashed.git] / usr / src / test / zfs-tests / include / default.cfg
blob9580001eb16a4e9cc5155dcb55b5f508de7c75f3
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
23 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24 # Use is subject to license terms.
28 # Copyright (c) 2012, 2014 by Delphix. All rights reserved.
31 . $STF_SUITE/include/commands.cfg
32 . $STF_SUITE/include/libtest.shlib
34 # Define run length constants
35 export RT_LONG="3"
36 export RT_MEDIUM="2"
37 export RT_SHORT="1"
39 # Define macro for zone test
40 export ZONE_POOL="zonepool"
41 export ZONE_CTR="zonectr"
43 # Test Suite Specific Commands
44 export CHG_USR_EXEC="/opt/zfs-tests/bin/chg_usr_exec"
45 export DEVNAME2DEVID="/opt/zfs-tests/bin/devname2devid"
46 export DIR_RD_UPDATE="/opt/zfs-tests/bin/dir_rd_update"
47 export FILE_CHECK="/opt/zfs-tests/bin/file_check"
48 export FILE_TRUNC="/opt/zfs-tests/bin/file_trunc"
49 export FILE_WRITE="/opt/zfs-tests/bin/file_write"
50 export GETHOLES="/opt/zfs-tests/bin/getholes"
51 export LARGEST_FILE="/opt/zfs-tests/bin/largest_file"
52 export MKBUSY="/opt/zfs-tests/bin/mkbusy"
53 export MKHOLES="/opt/zfs-tests/bin/mkholes"
54 export MKTREE="/opt/zfs-tests/bin/mktree"
55 export MMAPWRITE="/opt/zfs-tests/bin/mmapwrite"
56 export RANDFREE_FILE="/opt/zfs-tests/bin/randfree_file"
57 export READMMAP="/opt/zfs-tests/bin/readmmap"
58 export RENAME_DIR="/opt/zfs-tests/bin/rename_dir"
59 export RM_LNKCNT_ZERO_FILE="/opt/zfs-tests/bin/rm_lnkcnt_zero_file"
61 # ensure we're running in the C locale, since
62 # localised messages may result in test failures
63 export LC_ALL="C"
64 export LANG="C"
67 # pattern to ignore from 'zpool list'.
69 export NO_POOLS="no pools available"
71 # pattern to ignore from 'zfs list'.
72 export NO_DATASETS="no datasets available"
74 export TEST_BASE_DIR="/"
76 # Default to compression ON
77 export COMPRESSION_PROP=on
79 # Default to using the checksum
80 export CHECKSUM_PROP=on
82 # some common variables used by test scripts :
84 # some test pool names
85 export TESTPOOL=testpool.$$
86 export TESTPOOL1=testpool1.$$
87 export TESTPOOL2=testpool2.$$
88 export TESTPOOL3=testpool3.$$
90 # some test file system names
91 export TESTFS=testfs.$$
92 export TESTFS1=testfs1.$$
93 export TESTFS2=testfs2.$$
94 export TESTFS3=testfs3.$$
96 # some test directory names
97 export TESTDIR=${TEST_BASE_DIR%%/}/testdir$$
98 export TESTDIR0=${TEST_BASE_DIR%%/}/testdir0$$
99 export TESTDIR1=${TEST_BASE_DIR%%/}/testdir1$$
100 export TESTDIR2=${TEST_BASE_DIR%%/}/testdir2$$
102 export ZFSROOT=
104 export TESTSNAP=testsnap$$
105 export TESTSNAP1=testsnap1$$
106 export TESTSNAP2=testsnap2$$
107 export TESTCLONE=testclone$$
108 export TESTCLONE1=testclone1$$
109 export TESTCLONE2=testclone2$$
110 export TESTCLCT=testclct$$
111 export TESTCTR=testctr$$
112 export TESTCTR1=testctr1$$
113 export TESTCTR2=testctr2$$
114 export TESTVOL=testvol$$
115 export TESTVOL1=testvol1$$
116 export TESTVOL2=testvol2$$
117 export TESTFILE0=testfile0.$$
118 export TESTFILE1=testfile1.$$
119 export TESTFILE2=testfile2.$$
121 export LONGPNAME="poolname50charslong_012345678901234567890123456789"
122 export LONGFSNAME="fsysname50charslong_012345678901234567890123456789"
123 export SNAPFS="$TESTPOOL/$TESTFS@$TESTSNAP"
124 export SNAPFS1="$TESTPOOL/$TESTVOL@$TESTSNAP"
126 export VOLSIZE=150m
127 export BIGVOLSIZE=1eb
129 # Default to limit disks to be checked
130 export MAX_FINDDISKSNUM=6
132 # For iscsi target support
133 export ISCSITGTFILE=/tmp/iscsitgt_file
134 export ISCSITGT_FMRI=svc:/system/iscsitgt:default
136 export AUTO_SNAP=$($SVCS -a | $GREP auto-snapshot | $GREP online | $AWK \
137     '{print $3}')
140 # finally, if we're running in a local zone
141 # we take some additional actions
142 if ! is_global_zone; then
143         reexport_pool
146 export ZFS_VERSION=5
147 export ZFS_ALL_VERSIONS="1 2 3 4 5"
149 for i in $ZFS_ALL_VERSIONS; do
150         eval 'export ZFS_VERSION_$i="v${i}-fs"'
151 done