]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/geom_raid3/test-1.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / geom_raid3 / test-1.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 . `dirname $0`/conf.sh
5
6 echo "1..2"
7
8 us0=45
9 us1=`expr $us0 + 1`
10 us2=`expr $us0 + 2`
11
12 mdconfig -a -t malloc -s 1M -u $us0 || exit 1
13 mdconfig -a -t malloc -s 2M -u $us1 || exit 1
14 mdconfig -a -t malloc -s 3M -u $us2 || exit 1
15
16 graid3 label $name /dev/md${us0} /dev/md${us1} /dev/md${us2} 2>/dev/null || exit 1
17 devwait
18
19 # Size of created device should be 2MB - 1024B.
20
21 mediasize=`diskinfo /dev/raid3/${name} | awk '{print $3}'`
22 if [ $mediasize -eq 2096128 ]; then
23         echo "ok 1"
24 else
25         echo "not ok 1"
26 fi
27 sectorsize=`diskinfo /dev/raid3/${name} | awk '{print $2}'`
28 if [ $sectorsize -eq 1024 ]; then
29         echo "ok 2"
30 else
31         echo "not ok 2"
32 fi
33
34 graid3 stop $name
35 mdconfig -d -u $us0
36 mdconfig -d -u $us1
37 mdconfig -d -u $us2