1# vim: filetype=sh
2#
3# CDDL HEADER START
4#
5# The contents of this file are subject to the terms of the
6# Common Development and Distribution License (the "License").
7# You may not use this file except in compliance with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22
23#
24# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26
27. $STF_SUITE/include/libtest.kshlib
28
29set -A RW_FS_PROP "quota=512M" \
30		  "reservation=512M" \
31		  "recordsize=64K" \
32		  "mountpoint=/tmp/mnt${TESTCASE_ID}" \
33		  "checksum=fletcher2" \
34		  "compression=lzjb" \
35		  "atime=off" \
36		  "devices=off" \
37		  "exec=off" \
38		  "setuid=off" \
39		  "readonly=on" \
40		  "snapdir=visible" \
41		  "aclmode=discard" \
42		  "aclinherit=discard" \
43		  "canmount=off" \
44		  "local:department=123"
45
46is_global_zone && \
47	set -A RW_FS_PROP ${RW_FS_PROP[*]} "sharenfs=on"
48
49set -A RW_VOL_PROP "volblocksize=16K" \
50		   "checksum=fletcher2" \
51		   "compression=lzjb" \
52		   "readonly=on" \
53		   "local:department=123"
54
55set -A RW_VOL_CLONE_PROP "checksum=fletcher2" \
56		   "compression=lzjb" \
57		   "readonly=on" \
58		   "local:department=123"
59
60set -A FS_ONLY_PROP "quota=512M" \
61                    "recordsize=64K" \
62                    "mountpoint=/tmp/mnt${TESTCASE_ID}" \
63                    "sharenfs=on" \
64                    "atime=off" \
65                    "devices=off" \
66                    "exec=off" \
67                    "setuid=off" \
68                    "snapdir=visible" \
69                    "aclmode=discard" \
70                    "aclinherit=discard" \
71		    "canmount=off"
72
73$ZFS upgrade -v > /dev/null 2>&1
74if [[ $? -eq 0 ]]; then
75	set -A FS_ONLY_PROP ${FS_ONLY_PROP[*]} "version=1"
76fi
77
78set -A VOL_ONLY_PROP "volblocksize=16K" "volsize=512M"
79