2017-03-02 15:12:20 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-03-06 17:45:49 -07:00
|
|
|
set -e
|
|
|
|
|
2017-03-20 11:41:15 +01:00
|
|
|
if [ ! -f "/home/sys_sgsw/vhost_vm_image.qcow2" ]; then
|
2017-03-07 16:11:58 -07:00
|
|
|
echo "VM does not exist, exiting vhost tests without running"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2017-03-02 15:12:20 +01:00
|
|
|
WORKDIR=$(dirname $0)
|
|
|
|
cd $WORKDIR
|
|
|
|
|
|
|
|
param="$1"
|
|
|
|
|
|
|
|
if [ $(uname -s) = Linux ]; then
|
|
|
|
|
|
|
|
echo Running SPDK vhost fio autotest...
|
|
|
|
|
|
|
|
case $param in
|
|
|
|
-p|--performance)
|
|
|
|
echo Running performance suite...
|
|
|
|
./fiotest/autotest.sh --fio-bin=/home/sys_sgsw/fio_ubuntu \
|
2017-03-20 11:41:15 +01:00
|
|
|
--vm=0,/home/sys_sgsw/vhost_vm_image.qcow2,Nvme0n1p0 \
|
2017-06-16 12:03:46 +02:00
|
|
|
--test-type=spdk_vhost_scsi \
|
|
|
|
--fio-jobs=$WORKDIR/fiotest/fio_jobs/default_performance.job \
|
|
|
|
--qemu-src=/home/sys_sgsw/vhost/qemu
|
|
|
|
;;
|
|
|
|
-pb|--performance-blk)
|
|
|
|
echo Running blk performance suite...
|
|
|
|
./fiotest/autotest.sh --fio-bin=/home/sys_sgsw/fio_ubuntu \
|
|
|
|
--vm=0,/home/sys_sgsw/vhost_vm_image.qcow2,Nvme0n1p0 \
|
|
|
|
--test-type=spdk_vhost_blk \
|
2017-03-02 15:12:20 +01:00
|
|
|
--fio-jobs=$WORKDIR/fiotest/fio_jobs/default_performance.job \
|
2017-03-20 11:41:15 +01:00
|
|
|
--qemu-src=/home/sys_sgsw/vhost/qemu
|
2017-03-02 15:12:20 +01:00
|
|
|
;;
|
|
|
|
-i|--integrity)
|
|
|
|
echo Running integrity suite...
|
|
|
|
./fiotest/autotest.sh --fio-bin=/home/sys_sgsw/fio_ubuntu \
|
2017-03-20 11:41:15 +01:00
|
|
|
--vm=0,/home/sys_sgsw/vhost_vm_image.qcow2,Nvme0n1p0:Nvme0n1p1:Nvme0n1p2:Nvme0n1p3 \
|
2017-06-16 12:03:46 +02:00
|
|
|
--test-type=spdk_vhost_scsi \
|
|
|
|
--fio-jobs=$WORKDIR/fiotest/fio_jobs/default_integrity.job \
|
2017-07-13 18:02:19 +02:00
|
|
|
--qemu-src=/home/sys_sgsw/vhost/qemu -x
|
2017-06-16 12:03:46 +02:00
|
|
|
;;
|
|
|
|
-ib|--integrity-blk)
|
|
|
|
echo Running blk integrity suite...
|
|
|
|
./fiotest/autotest.sh --fio-bin=/home/sys_sgsw/fio_ubuntu \
|
|
|
|
--vm=0,/home/sys_sgsw/vhost_vm_image.qcow2,Nvme0n1p0:Nvme0n1p1:Nvme0n1p2:Nvme0n1p3 \
|
|
|
|
--test-type=spdk_vhost_blk \
|
2017-03-02 15:12:20 +01:00
|
|
|
--fio-jobs=$WORKDIR/fiotest/fio_jobs/default_integrity.job \
|
2017-07-13 18:02:19 +02:00
|
|
|
--qemu-src=/home/sys_sgsw/vhost/qemu -x
|
2017-03-02 15:12:20 +01:00
|
|
|
;;
|
2016-12-14 15:34:03 -05:00
|
|
|
-f|--fs-integrity)
|
|
|
|
echo Running filesystem integrity suite...
|
|
|
|
VM_IMG=/home/sys_sgsw/vhost_scsi_vm_image.qcow2 ./integrity/integrity_start.sh
|
|
|
|
;;
|
2017-03-02 15:12:20 +01:00
|
|
|
-h|--help)
|
2017-06-16 12:03:46 +02:00
|
|
|
echo "-i|--integrity for running an integrity test with vhost scsi"
|
2016-12-14 15:34:03 -05:00
|
|
|
echo "-f|--fs-integrity for running an integrity test with filesystem"
|
2017-07-13 18:02:19 +02:00
|
|
|
echo "-p|--performance for running a performance test with vhost scsi"
|
|
|
|
echo "-ib|--integrity-blk for running an integrity test with vhost blk"
|
2017-06-16 12:03:46 +02:00
|
|
|
echo "-pb|--performance-blk for running a performance test with vhost blk"
|
2017-03-02 15:12:20 +01:00
|
|
|
echo "-h|--help prints this message"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "unknown test type"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
fi
|