diff options
Diffstat (limited to 'tests/testdev')
-rw-r--r-- | tests/testdev | 14 |
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 + |