-
Notifications
You must be signed in to change notification settings - Fork 1
/
runtest
executable file
·49 lines (39 loc) · 1 KB
/
runtest
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
export MPNAME="mp"
export LIB=./lib
# Select backend device type.
# Available MULTIPATH_BACKEND_MODULE options are:
# tcmloop nvmefcloop scsidebug
export MULTIPATH_BACKEND_MODULE="tcmloop"
#export MULTIPATH_BACKEND_MODULE="nvmefcloop"
#export NVME_FCLOOP_DEVICE="/dev/pmem0"
# Uncomment this if you want longer tests (lib/fio_validate default is 30 secs)
#export FIO_VALIDATE_OPT="--runtime=300 --size=100G"
# Available MULTIPATH_QUEUE_MODE options are:
# mq rq bio
export MULTIPATH_QUEUE_MODE="mq"
echo Y > /sys/module/scsi_mod/parameters/use_blk_mq
echo Y > /sys/module/dm_mod/parameters/use_blk_mq
TESTS="./tests/*"
if [ "$*" ]; then
TESTS=$*
fi
PASSED=
FAILED=
SKIPPED=
for t in $TESTS; do
echo "** Running: $t"
$t
RESULT=$?
if [ $RESULT -eq 0 ]; then
PASSED="$PASSED $(basename $t)"
elif [ $RESULT -eq 1 ]; then
FAILED="$FAILED $(basename $t)"
else
SKIPPED="$SKIPPED $(basename $t)"
fi
done
echo "** summary **"
echo "PASSED: $PASSED"
echo "FAILED: $FAILED"
echo "SKIPPED: $SKIPPED"