2004-05-22 10:58:53 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2005-12-07 01:27:23 +00:00
|
|
|
. `dirname $0`/conf.sh
|
2004-05-22 10:58:53 +00:00
|
|
|
|
2005-12-07 00:37:14 +00:00
|
|
|
echo "1..1"
|
|
|
|
|
2005-12-07 01:27:23 +00:00
|
|
|
us=45
|
|
|
|
|
2004-05-22 10:58:53 +00:00
|
|
|
mdconfig -a -t malloc -s 1M -u $us || exit 1
|
|
|
|
|
|
|
|
gnop create /dev/md${us} || exit 1
|
|
|
|
|
|
|
|
# Size of created device should be 1MB.
|
|
|
|
|
|
|
|
size=`diskinfo /dev/md${us}.nop | awk '{print $3}'`
|
|
|
|
|
|
|
|
if [ $size -eq 1048576 ]; then
|
2005-12-07 00:37:14 +00:00
|
|
|
echo "ok 1"
|
2004-05-22 10:58:53 +00:00
|
|
|
else
|
2005-12-07 00:37:14 +00:00
|
|
|
echo "not ok 1"
|
2004-05-22 10:58:53 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
gnop destroy md${us}.nop
|
|
|
|
mdconfig -d -u $us
|