d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# CDDL HEADER START
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# The contents of this file are subject to the terms of the
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Common Development and Distribution License (the "License").
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# You may not use this file except in compliance with the License.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# or http://www.opensolaris.org/os/licensing.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# See the License for the specific language governing permissions
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# and limitations under the License.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# When distributing Covered Code, include this CDDL HEADER in each
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# If applicable, add the following below this CDDL HEADER, with the
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# fields enclosed by brackets "[]" replaced with your own identifying
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# information: Portions Copyright [yyyy] [name of copyright owner]
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# CDDL HEADER END
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Use is subject to license terms.
286ef71398fb54b1d5007d6f45aa4320a9e0ede2Paul Dagnelie# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Define run length constants
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport RT_LONG="3"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport RT_MEDIUM="2"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport RT_SHORT="1"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Define macro for zone test
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport ZONE_POOL="zonepool"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport ZONE_CTR="zonectr"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# ensure we're running in the C locale, since
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# localised messages may result in test failures
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport LC_ALL="C"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport LANG="C"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# pattern to ignore from 'zpool list'.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport NO_POOLS="no pools available"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# pattern to ignore from 'zfs list'.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport NO_DATASETS="no datasets available"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport TEST_BASE_DIR="/"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Default to compression ON
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport COMPRESSION_PROP=on
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Default to using the checksum
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport CHECKSUM_PROP=on
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# some common variables used by test scripts :
dcbf3bd6a1f1360fc1afcee9e22c6dcff7844bf2George Wilsonexport FIO_SCRIPTS=$STF_SUITE/tests/perf/fio
dcbf3bd6a1f1360fc1afcee9e22c6dcff7844bf2George Wilsonexport PERF_SCRIPTS=$STF_SUITE/tests/perf/scripts
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# some test pool names
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTPOOL=testpool
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTPOOL1=testpool1
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTPOOL2=testpool2
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTPOOL3=testpool3
dcbf3bd6a1f1360fc1afcee9e22c6dcff7844bf2George Wilsonexport PERFPOOL=perfpool
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# some test file system names
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTFS=testfs
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTFS1=testfs1
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTFS2=testfs2
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTFS3=testfs3
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# some test directory names
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTDIR=${TEST_BASE_DIR%%/}/testdir
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTDIR0=${TEST_BASE_DIR%%/}/testdir0
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTDIR1=${TEST_BASE_DIR%%/}/testdir1
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTDIR2=${TEST_BASE_DIR%%/}/testdir2
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedy# some test sub file system names
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTSUBFS=subfs
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTSUBFS1=subfs1
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTSUBFS2=subfs2
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport ZFSROOT=
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTSNAP=testsnap
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTSNAP1=testsnap1
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTSNAP2=testsnap2
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTCLONE=testclone
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTCLONE1=testclone1
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTCLONE2=testclone2
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTCLCT=testclct
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTCTR=testctr
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTCTR1=testctr1
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTCTR2=testctr2
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTVOL=testvol
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTVOL1=testvol1
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTVOL2=testvol2
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTFILE0=testfile0
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTFILE1=testfile1
ac89d1e83d4735655102d06f099fb2d21bf120f6John Kennedyexport TESTFILE2=testfile2
edb901aab9c738b5eb15aa55933e82b0f2f9d9a2Marcel Telkaexport TESTBKMARK=testbkmark
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport LONGPNAME="poolname50charslong_012345678901234567890123456789"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport LONGFSNAME="fsysname50charslong_012345678901234567890123456789"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport SNAPFS="$TESTPOOL/$TESTFS@$TESTSNAP"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport SNAPFS1="$TESTPOOL/$TESTVOL@$TESTSNAP"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport VOLSIZE=150m
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport BIGVOLSIZE=1eb
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Default to limit disks to be checked
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport MAX_FINDDISKSNUM=6
4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1cMatthew Ahrens# Default minimum size for file based vdevs in the test suite
4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1cMatthew Ahrensexport MINVDEVSIZE=$((256 * 1024 * 1024))
4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1cMatthew Ahrens# Minimum vdev size possible as defined in the OS
4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1cMatthew Ahrensexport SPA_MINDEVSIZE=$((64 * 1024 * 1024))
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedyexport AUTO_SNAP=$(svcs -a | grep auto-snapshot | grep online | awk \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# finally, if we're running in a local zone
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# we take some additional actions
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyif ! is_global_zone; then
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport ZFS_VERSION=5
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyexport ZFS_ALL_VERSIONS="1 2 3 4 5"
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyfor i in $ZFS_ALL_VERSIONS; do
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy eval 'export ZFS_VERSION_$i="v${i}-fs"'