]>
git.proxmox.com Git - mirror_zfs.git/blob - tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_003_pos.ksh
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.
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.
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]
24 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
29 # Copyright (c) 2013 by Delphix. All rights reserved.
33 # Copyright (c) 2016-2017 by Lawrence Livermore National Security, LLC.
37 # Verify zpool status command mode (-c) works for all pre-baked scripts.
40 # 1. Make sure each script creates at least one new column.
41 # 2. Make sure the new column values exist.
42 # 3. Make sure we can run multiple scripts in one -c line
44 .
$STF_SUITE/include
/libtest.shlib
45 .
$STF_SUITE/include
/zpool_script.shlib
47 verify_runnable
"both"
50 if is_global_zone
; then
53 testpool
="${TESTPOOL%%/*}"
56 files
="$(ls $ZPOOLSCRIPTDIR)"
59 if [ ! -x "$ZPOOLSCRIPTDIR/$i" ] ; then
60 # Skip non-executables
64 # Collect executable script names
67 # Run each one with -c
68 test_zpool_script
"$i" "$testpool" "zpool status -P -c"
71 # Test that we can run multiple scripts separated with a commma by running
72 # all the scripts in a single -c line.
73 allscripts
="$(echo $scripts | sed -r 's/[[:blank:]]+/,/g')"
74 test_zpool_script
"$allscripts" "$testpool" "zpool status -P -c"