Pass read/write CRx registers to userspace
[freebsd-src/fkvm-freebsd.git] / tools / regression / geom_eli / configure-b-B.t
blob23aa4124fb7b3dbff42e8e491c0d3a4c35d0949b
1 #!/bin/sh
2 # $FreeBSD$
4 base=`basename $0`
5 no=45
6 sectors=100
7 mdconfig -a -t malloc -s `expr $sectors + 1` -u $no || exit 1
9 echo "1..17"
11 geli init -B none -P -K /dev/null md${no}
12 if [ $? -eq 0 ]; then
13 echo "ok 1"
14 else
15 echo "not ok 1"
18 geli dump md${no} | egrep 'flags: 0x0$' >/dev/null
19 if [ $? -eq 0 ]; then
20 echo "ok 2"
21 else
22 echo "not ok 2"
25 geli init -B none -b -P -K /dev/null md${no}
26 if [ $? -eq 0 ]; then
27 echo "ok 3"
28 else
29 echo "not ok 3"
32 geli dump md${no} | egrep 'flags: 0x2$' >/dev/null
33 if [ $? -eq 0 ]; then
34 echo "ok 4"
35 else
36 echo "not ok 4"
39 geli configure -B md${no}
40 if [ $? -eq 0 ]; then
41 echo "ok 5"
42 else
43 echo "not ok 5"
46 geli dump md${no} | egrep 'flags: 0x0$' >/dev/null
47 if [ $? -eq 0 ]; then
48 echo "ok 6"
49 else
50 echo "not ok 6"
53 geli configure -b md${no}
54 if [ $? -eq 0 ]; then
55 echo "ok 7"
56 else
57 echo "not ok 7"
60 geli dump md${no} | egrep 'flags: 0x2$' >/dev/null
61 if [ $? -eq 0 ]; then
62 echo "ok 8"
63 else
64 echo "not ok 8"
67 geli attach -p -k /dev/null md${no}
68 if [ $? -eq 0 ]; then
69 echo "ok 9"
70 else
71 echo "not ok 9"
74 geli list md${no}.eli | egrep '^Flags: .*BOOT' >/dev/null
75 if [ $? -eq 0 ]; then
76 echo "ok 10"
77 else
78 echo "not ok 10"
81 geli configure -B md${no}
82 if [ $? -eq 0 ]; then
83 echo "ok 11"
84 else
85 echo "not ok 11"
88 geli list md${no}.eli | egrep '^Flags: .*BOOT' >/dev/null
89 if [ $? -ne 0 ]; then
90 echo "ok 12"
91 else
92 echo "not ok 12"
95 geli dump md${no} | egrep 'flags: 0x0$' >/dev/null
96 if [ $? -eq 0 ]; then
97 echo "ok 13"
98 else
99 echo "not ok 13"
102 geli configure -b md${no}
103 if [ $? -eq 0 ]; then
104 echo "ok 14"
105 else
106 echo "not ok 14"
109 geli list md${no}.eli | egrep '^Flags: .*BOOT' >/dev/null
110 if [ $? -eq 0 ]; then
111 echo "ok 15"
112 else
113 echo "not ok 15"
116 geli dump md${no} | egrep 'flags: 0x2$' >/dev/null
117 if [ $? -eq 0 ]; then
118 echo "ok 16"
119 else
120 echo "not ok 16"
123 geli detach md${no}
124 if [ $? -eq 0 ]; then
125 echo "ok 17"
126 else
127 echo "not ok 17"
130 mdconfig -d -u $no