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