summaryrefslogtreecommitdiffstats
path: root/tools/regression/geom_stripe/test-1.t
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-12-07 01:30:44 +0000
committerpjd <pjd@FreeBSD.org>2005-12-07 01:30:44 +0000
commit4ed0dcf09fd85f4fd2c1e14c2a25a1904bd7df42 (patch)
tree747004ab0cd0d38971da07072bf406b7cafc8211 /tools/regression/geom_stripe/test-1.t
parent5250c7022c73d349fa528f604d1d9fc67bd54cec (diff)
downloadFreeBSD-src-4ed0dcf09fd85f4fd2c1e14c2a25a1904bd7df42.zip
FreeBSD-src-4ed0dcf09fd85f4fd2c1e14c2a25a1904bd7df42.tar.gz
Convert gstripe(8) regression tests to the new framework.
Diffstat (limited to 'tools/regression/geom_stripe/test-1.t')
-rw-r--r--tools/regression/geom_stripe/test-1.t30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/regression/geom_stripe/test-1.t b/tools/regression/geom_stripe/test-1.t
new file mode 100644
index 0000000..9b398f0
--- /dev/null
+++ b/tools/regression/geom_stripe/test-1.t
@@ -0,0 +1,30 @@
+#!/bin/sh
+# $FreeBSD$
+
+. `dirname $0`/conf.sh
+
+echo "1..1"
+
+us=45
+
+mdconfig -a -t malloc -s 1M -u $us || exit 1
+mdconfig -a -t malloc -s 2M -u `expr $us + 1` || exit 1
+mdconfig -a -t malloc -s 3M -u `expr $us + 2` || exit 1
+
+gstripe create -s 16384 $name /dev/md${us} /dev/md`expr $us + 1` /dev/md`expr $us + 2` || exit 1
+devwait
+
+# Size of created device should be 1MB * 3.
+
+size=`diskinfo /dev/stripe/${name} | awk '{print $3}'`
+
+if [ $size -eq 3145728 ]; then
+ echo "ok 1"
+else
+ echo "not ok 1"
+fi
+
+gstripe destroy $name
+mdconfig -d -u $us
+mdconfig -d -u `expr $us + 1`
+mdconfig -d -u `expr $us + 2`
OpenPOWER on IntegriCloud