summaryrefslogtreecommitdiff
path: root/tests/testdev
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-08-04 04:56:22 +0000
committerNeil Brown <neilb@suse.de>2005-08-04 04:56:22 +0000
commit5e7519fa84baa9a195b27fdaccbc71b07dbab5d8 (patch)
tree1e419e2dc46c2439c842536e10937b1fc99b8718 /tests/testdev
parentf277ce367125882ea809f981172b8d5c0cc4d5c7 (diff)
downloadmdadm-5e7519fa84baa9a195b27fdaccbc71b07dbab5d8.tar.gz
Add test suite and release
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Diffstat (limited to 'tests/testdev')
-rw-r--r--tests/testdev14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/testdev b/tests/testdev
new file mode 100644
index 0000000..9e490f9
--- /dev/null
+++ b/tests/testdev
@@ -0,0 +1,14 @@
+dev=$1
+cnt=$2
+size=$3
+chunk=$4
+mkfs -j $dev > /dev/null 2>&1 && fsck -fn $dev
+dsize=$[size/chunk]
+dsize=$[dsize*chunk]
+rasize=$[dsize*1024*cnt]
+if [ $rasize -ne `/sbin/blockdev --getsize64 $dev` ]
+then
+ echo "ERROR: size is wrong for $dev: $cnt * $size (chunk=$chunk) = $rasize, not `/sbin/blockdev --getsize64 $dev`"
+ exit 1;
+fi
+