]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - 6/tools/regression/geom_concat/test-1.sh
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / 6 / tools / regression / geom_concat / test-1.sh
1 #!/bin/sh
2 # $FreeBSD$
3
4 name="test"
5 base=`basename $0`
6 us=45
7
8 mdconfig -a -t malloc -s 1M -u $us || exit 1
9 mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1
10 mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1
11
12 gconcat create $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1
13
14 # Size of created device should be 1MB + 2MB + 3MB.
15
16 size=`diskinfo /dev/concat/${name} | awk '{print $3}'`
17
18 if [ $size -eq 6291456 ]; then
19         echo "PASS"
20 else
21         echo "FAIL"
22 fi
23
24 gconcat destroy $name
25 mdconfig -d -u $us
26 mdconfig -d -u `expr $us + 1`
27 mdconfig -d -u `expr $us + 2`