#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
# Copyright (c) 2013, 2016 by Delphix. All rights reserved.
#
# This setup script is moderately complex, as it creates scenarios for all
# of the tests included in this directory. Usually we'd want each test case
# given the nature of these tests. However, as a side-effect, one test
# leaving the system in an unknown state could impact other test cases.
VOLSIZE=150m
# Create a default setup that includes a volume
default_setup_noexit "$DISK" "" "volume"
#
# The rest of this setup script creates a ZFS filesystem configuration
# that is used to test the rest of the zfs subcommands in this directory.
#
# create a snapshot and a clone to test clone promote
# create a file in the filesystem that isn't in the above snapshot
# create a non-default property and a child we can use to test inherit
# create an unmounted filesystem to test unmount
# send our snapshot to a known file in /tmp
if [ ! -s /tmp/zfstest_datastream.dat ]
then
log_fail "ZFS send datafile was not created!"
fi
set -A props $PROP_NAMES
set -A prop_vals $PROP_VALS
typeset -i i=0
while [[ $i -lt ${#props[*]} ]]
do
i=$(( $i + 1 ))
done
# create a filesystem we don't mind renaming
then
# create a filesystem we can share
# create a filesystem that we can unshare
fi
then
# Now create several virtual disks to test zpool with
# and create a pool we can perform attach remove replace,
# etc. operations with
# Offline one of the disks to test online
# create an exported pool to test import
set -A props $POOL_PROPS
set -A prop_vals $POOL_VALS
typeset -i i=0
while [[ $i -lt ${#props[*]} ]]
do
i=$(( $i + 1 ))
done
# copy a v1 pool from cli_root
fi