1#!/bin/sh
2# $FreeBSD$
3
4dir=`dirname $0`
5. ${dir}/../../misc.sh
6
7echo "1..14"
8
9disks_create 5
10names_create 1
11
12expect_ok ${ZPOOL} create ${name0} ${disk0}
13expect_ok ${ZPOOL} status -x ${name0}
14expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
15exp=`(
16  echo "  pool: ${name0}"
17  echo " state: ONLINE"
18  echo " scrub: none requested"
19  echo "config:"
20  echo "	NAME        STATE   READ WRITE CKSUM"
21  echo "	${name0}    ONLINE     0     0     0"
22  echo "	  ${disk0}  ONLINE     0     0     0"
23  echo "errors: No known data errors"
24)`
25expect "${exp}" ${ZPOOL} status ${name0}
26expect_ok ${ZPOOL} destroy ${name0}
27expect_fl ${ZPOOL} status -x ${name0}
28expect_fl ${ZPOOL} destroy ${name0}
29
30expect_ok ${ZPOOL} create ${name0} ${disk0} ${disk1} ${disk2} ${disk3} ${disk4}
31expect_ok ${ZPOOL} status -x ${name0}
32expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
33exp=`(
34  echo "  pool: ${name0}"
35  echo " state: ONLINE"
36  echo " scrub: none requested"
37  echo "config:"
38  echo "	NAME        STATE   READ WRITE CKSUM"
39  echo "	${name0}    ONLINE     0     0     0"
40  echo "	  ${disk0}  ONLINE     0     0     0"
41  echo "	  ${disk1}  ONLINE     0     0     0"
42  echo "	  ${disk2}  ONLINE     0     0     0"
43  echo "	  ${disk3}  ONLINE     0     0     0"
44  echo "	  ${disk4}  ONLINE     0     0     0"
45  echo "errors: No known data errors"
46)`
47expect "${exp}" ${ZPOOL} status ${name0}
48expect_ok ${ZPOOL} destroy ${name0}
49expect_fl ${ZPOOL} status -x ${name0}
50expect_fl ${ZPOOL} destroy ${name0}
51
52disks_destroy
53