1 #! /usr/bin/ksh -p
2 #
3 #
4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
7 # 1.0 of the CDDL.
8 #
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
12 #
13
14 #
15 # Copyright 2016 Nexenta Systems, Inc. All rights reserved.
16 #
17
18 . $STF_SUITE/tests/functional/wbc/wbc.cfg
19 . $STF_SUITE/tests/functional/wbc/wbc.kshlib
20
21 #
22 # DESCRIPTION:
23 # Setting sync_to_special to invalid value should fail.
24 #
25 # STRATEGY:
26 # 1. Create pool with special devices.
27 # 2. Setting different invalid sync_to_special property values.
28 # 3. Verify all the invalid sync_to_special values can not be set
29 # to the pool.
30 #
31
32 verify_runnable "global"
33 log_assert "Setting sync_to_special to invalid value should fail."
34 log_onexit cleanup
35 log_must create_pool_special $TESTPOOL
36 log_must display_status $TESTPOOL
37
38 for sync_to_special in "never" "all" "on" "off"; do
39 log_mustnot set_pool_prop "sync_to_special" $sync_to_special $TESTPOOL
40 done
41
42 log_pass "ZFS can handle invalid sync_to_special property values."