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