summaryrefslogtreecommitdiff
path: root/tools/run-writetest.sh
blob: 438defa45a370aa3541d6f8fc279495b2c5e28f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

dir=/tmp
numfiles=128
nocache=
sync=
filesize=`expr 10 \* 1048576`

while [ $# -gt 1 ] ; do
    case $1 in
	-d) dir=$2; shift; shift ;;
	-n) numfiles=$2; shift; shift ;;
	-D) nocache="-D"; shift ;;
        -s) sync="-s"; shift;;
        -S) filesize=$2; shift; shift ;;
        *) break ;;
    esac
done

rm -r $dir/sftest

for bs in $@ ; do
    echo "Blocksize $bs"
    ./sftest $sync $nocache -b $bs -q -d $dir -n $numfiles -S $filesize
    rm -r $dir/sftest
done