xref: /freebsd/tests/sys/geom/class/raid3/1_test.sh (revision 61ba55bcf70f2340f9c943c9571113b3fd8eda69)
1#!/bin/sh
2
3. `dirname $0`/conf.sh
4
5echo "1..2"
6
7us0=$(attach_md -t malloc -s 1M) || exit 1
8us1=$(attach_md -t malloc -s 2M) || exit 1
9us2=$(attach_md -t malloc -s 3M) || exit 1
10
11graid3 label $name /dev/${us0} /dev/${us1} /dev/${us2} 2>/dev/null || exit 1
12devwait
13
14# Size of created device should be 2MB - 1024B.
15
16mediasize=`diskinfo /dev/raid3/${name} | awk '{print $3}'`
17if [ $mediasize -eq 2096128 ]; then
18	echo "ok 1"
19else
20	echo "not ok 1"
21fi
22sectorsize=`diskinfo /dev/raid3/${name} | awk '{print $2}'`
23if [ $sectorsize -eq 1024 ]; then
24	echo "ok 2"
25else
26	echo "not ok 2"
27fi
28