Print this page
4206 history_003_pos relies on exact size of history log and entries
4207 history_008_pos depends on obsolete internal history log message
4208 Typo in zfs_main.c: "posxiuser"
4209 Populate zfstest with the remainder of the STF tests
Reviewed by: Sonu Pillai <sonu.pillai@delphix.com>
Reviewed by: Will Guyette <will.guyette@delphix.com>
Reviewed by: Eric Diven <eric.diven@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/test/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_002_pos.ksh
+++ new/usr/src/test/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_002_pos.ksh
1 1 #!/usr/bin/ksh -p
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # The contents of this file are subject to the terms of the
6 6 # Common Development and Distribution License (the "License").
7 7 # You may not use this file except in compliance with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
15 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 # If applicable, add the following below this CDDL HEADER, with the
17 17 # fields enclosed by brackets "[]" replaced with your own identifying
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
18 18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 19 #
20 20 # CDDL HEADER END
21 21 #
22 22
23 23 #
24 24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25 25 # Use is subject to license terms.
26 26 #
27 27
28 +#
29 +# Copyright (c) 2013 by Delphix. All rights reserved.
30 +#
31 +
28 32 . $STF_SUITE/include/libtest.shlib
29 33 . $STF_SUITE/tests/functional/cli_root/zpool_get/zpool_get.cfg
30 34
31 35 #
32 36 # DESCRIPTION:
33 37 #
34 38 # zpool get all works as expected
35 39 #
36 40 # STRATEGY:
37 41 #
38 42 # 1. Using zpool get, retrieve all default values
39 43 # 2. Verify that the header is printed
40 44 # 3. Verify that we can see all the properties we expect to see
41 45 # 4. Verify that the total output contains just those properties + header.
42 46 #
43 47 # Test for those properties are expected to check whether their
44 48 # default values are sane, or whether they can be changed with zpool set.
45 49 #
46 50
47 51 log_assert "Zpool get all works as expected"
48 52
49 53 typeset -i i=0;
50 54
51 55 if ! is_global_zone ; then
52 56 TESTPOOL=${TESTPOOL%%/*}
53 57 fi
54 58
55 59 log_must $ZPOOL get all $TESTPOOL
56 60 $ZPOOL get all $TESTPOOL > /tmp/values.$$
57 61
58 62 log_note "Checking zpool get all output for a header."
59 63 $GREP ^"NAME " /tmp/values.$$ > /dev/null 2>&1
60 64 if [ $? -ne 0 ]
61 65 then
62 66 log_fail "The header was not printed from zpool get all"
63 67 fi
64 68
65 69
66 70 while [ $i -lt "${#properties[@]}" ]
67 71 do
68 72 log_note "Checking for ${properties[$i]} property"
69 73 $GREP "$TESTPOOL *${properties[$i]}" /tmp/values.$$ > /dev/null 2>&1
70 74 if [ $? -ne 0 ]
71 75 then
72 76 log_fail "zpool property ${properties[$i]} was not found\
73 77 in pool output."
↓ open down ↓ |
36 lines elided |
↑ open up ↑ |
74 78 fi
75 79 i=$(( $i + 1 ))
76 80 done
77 81
78 82 # increment the counter to include the header line
79 83 i=$(( $i + 1 ))
80 84
81 85 COUNT=$($WC /tmp/values.$$ | $AWK '{print $1}')
82 86 if [ $i -ne $COUNT ]
83 87 then
84 - log_fail "Length of output $COUNT was not equal to number of props + 1."
88 + log_fail "Found zpool features not in the zpool_get test config."
85 89 fi
86 90
87 91
88 92
89 93 $RM /tmp/values.$$
90 94 log_pass "Zpool get all works as expected"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX