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) 2013, 2016 by Delphix. All rights reserved.
29 #
30
31 . $STF_SUITE/include/libtest.shlib
32 . $STF_SUITE/tests/functional/slog/slog.cfg
33
34 function cleanup
35 {
36 if datasetexists $TESTPOOL ; then
37 log_must zpool destroy -f $TESTPOOL
38 fi
39 if datasetexists $TESTPOOL2 ; then
40 log_must zpool destroy -f $TESTPOOL2
41 fi
42 }
43
44 #
45 # Try zpool status/iostat for given pool
46 #
47 # $1 pool
48 #
49 function display_status
50 {
51 typeset pool=$1
52
53 typeset -i ret=0
54 zpool status -xv $pool > /dev/null 2>&1
55 ret=$?
56
57 zpool iostat > /dev/null 2>&1
58 ((ret |= $?))
59
60 typeset mntpnt=$(get_prop mountpoint $pool)
|
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) 2013, 2016 by Delphix. All rights reserved.
29 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
30 #
31
32 . $STF_SUITE/include/libtest.shlib
33 . $STF_SUITE/tests/functional/slog/slog.cfg
34
35 function cleanup
36 {
37 if datasetexists $TESTPOOL ; then
38 log_must destroy_pool $TESTPOOL
39 fi
40 if datasetexists $TESTPOOL2 ; then
41 log_must destroy_pool $TESTPOOL2
42 fi
43 }
44
45 #
46 # Try zpool status/iostat for given pool
47 #
48 # $1 pool
49 #
50 function display_status
51 {
52 typeset pool=$1
53
54 typeset -i ret=0
55 zpool status -xv $pool > /dev/null 2>&1
56 ret=$?
57
58 zpool iostat > /dev/null 2>&1
59 ((ret |= $?))
60
61 typeset mntpnt=$(get_prop mountpoint $pool)
|