]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/zfs/zpool/add/option-n.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / zfs / zpool / add / option-n.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 dir=`dirname $0`
5 . ${dir}/../../misc.sh
6
7 echo "1..5"
8
9 disks_create 2
10 names_create 1
11
12 expect_ok ${ZPOOL} create ${name0} ${disk0}
13 exp=`(
14   echo "would update '${name0}' to the following configuration:"
15   echo "        ${name0}"
16   echo "          ${disk0}"
17   echo "          ${disk1}"
18 )`
19 expect "${exp}" ${ZPOOL} add -n ${name0} ${disk1}
20 exp=`(
21   echo "  pool: ${name0}"
22   echo " state: ONLINE"
23   echo " scrub: none requested"
24   echo "config:"
25   echo "        NAME        STATE   READ WRITE CKSUM"
26   echo "        ${name0}    ONLINE     0     0     0"
27   echo "          ${disk0}  ONLINE     0     0     0"
28   echo "errors: No known data errors"
29 )`
30 expect "${exp}" ${ZPOOL} status ${name0}
31 expect_ok ${ZPOOL} destroy ${name0}
32 expect_fl ${ZPOOL} status -x ${name0}
33
34 disks_destroy