5 # This file and its contents are supplied under the terms of the
6 # Common Development and Distribution License ("CDDL"), version 1.0.
7 # You may only use this file in accordance with the terms of version
10 # A full copy of the text of the CDDL should have accompanied this
11 # source. A copy of the CDDL is also available via the Internet at
12 # http://www.illumos.org/license/CDDL.
16 # Copyright (c) 2017 Datto Inc.
19 . $STF_SUITE/include/libtest.shlib
23 # A badly formed parameter passed to 'zpool sync' should
27 # 1. Create an array containing bad 'zpool sync' parameters.
28 # 2. For each element, execute the sub-command.
29 # 3. Verify it returns an error.
32 verify_runnable "global"
34 set -A args "1" "-a" "-?" "--%" "-123456" "0.5" "-o" "-b" "-b no" "-z 2"
36 log_assert "Execute 'zpool sync' using invalid parameters."
39 while [[ $i -lt ${#args[*]} ]]; do
40 log_mustnot zpool sync ${args[i]}
44 log_pass "Invalid parameters to 'zpool sync' fail as expected."