xref: /freebsd/tests/sys/geom/class/stripe/1_test.sh (revision 96950419f15510287080c557174e0d8409f06956)
109d98641SEnji Cooper#!/bin/sh
209d98641SEnji Cooper
309d98641SEnji Cooper. `dirname $0`/conf.sh
409d98641SEnji Cooper
509d98641SEnji Cooperecho "1..1"
609d98641SEnji Cooper
7*96950419SGleb Smirnoffattach_md us0 -t malloc -s 1M || exit 1
8*96950419SGleb Smirnoffattach_md us1 -t malloc -s 2M || exit 1
9*96950419SGleb Smirnoffattach_md us2 -t malloc -s 3M || exit 1
1009d98641SEnji Cooper
1109d98641SEnji Coopergstripe create -s 16384 $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1
1209d98641SEnji Cooperdevwait
1309d98641SEnji Cooper
1409d98641SEnji Cooper# Size of created device should be 1MB * 3.
1509d98641SEnji Cooper
1609d98641SEnji Coopersize=`diskinfo /dev/stripe/${name} | awk '{print $3}'`
1709d98641SEnji Cooper
1809d98641SEnji Cooperif [ $size -eq 3145728 ]; then
1909d98641SEnji Cooper	echo "ok 1"
2009d98641SEnji Cooperelse
2109d98641SEnji Cooper	echo "not ok 1"
2209d98641SEnji Cooperfi
23