summaryrefslogtreecommitdiffstats
path: root/tests/testdev
blob: 9e8262de1da5d355303729abacc6b076ef1daf0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
dev=$1
cnt=$2
size=$3
chunk=$4
mkfs -j $dev > /dev/null 2>&1 && fsck -fn $dev >&2
dsize=$[size/chunk]
dsize=$[dsize*chunk]
rasize=$[dsize*2*cnt]
if [ $rasize -ne `/sbin/blockdev --getsize $dev` ]
then
  echo "ERROR: size is wrong for $dev: $cnt * $size (chunk=$chunk) = $rasize, not `/sbin/blockdev --getsize $dev`"
  exit 1;
fi