]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/geom_stripe/test-1.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / geom_stripe / test-1.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 . `dirname $0`/conf.sh
5
6 echo "1..1"
7
8 us=45
9
10 mdconfig -a -t malloc -s 1M -u $us || exit 1
11 mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1
12 mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1
13
14 gstripe create -s 16384 $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1
15 devwait
16
17 # Size of created device should be 1MB * 3.
18
19 size=`diskinfo /dev/stripe/${name} | awk '{print $3}'`
20
21 if [ $size -eq 3145728 ]; then
22         echo "ok 1"
23 else
24         echo "not ok 1"
25 fi
26
27 gstripe destroy $name
28 mdconfig -d -u $us
29 mdconfig -d -u `expr $us + 1`
30 mdconfig -d -u `expr $us + 2`