diff --git a/autotest.sh b/autotest.sh index d1f2b7f21..39af45ab8 100755 --- a/autotest.sh +++ b/autotest.sh @@ -156,6 +156,14 @@ if [ $SPDK_TEST_VHOST -eq 1 ]; then timing_enter fs_integrity_blk run_test ./test/vhost/spdk_vhost.sh --fs-integrity-blk timing_exit fs_integrity_blk + + timing_enter integrity_lvol_scsi_nightly + run_test ./test/vhost/spdk_vhost.sh --integrity-lvol-scsi-nightly + timing_exit integrity_lvol_scsi_nightly + + timing_enter integrity_lvol_blk_nightly + run_test ./test/vhost/spdk_vhost.sh --integrity-lvol-blk-nightly + timing_exit integrity_lvol_blk_nightly fi timing_enter integrity_lvol_scsi diff --git a/test/vhost/common/fio_jobs/default_integrity_nightly.job b/test/vhost/common/fio_jobs/default_integrity_nightly.job new file mode 100644 index 000000000..097401780 --- /dev/null +++ b/test/vhost/common/fio_jobs/default_integrity_nightly.job @@ -0,0 +1,23 @@ +[global] +ioengine=libaio +runtime=10 +filename= +group_reporting +thread +numjobs=1 +direct=1 +do_verify=1 +verify=md5 +verify_backlog=1024 + +[randwrite] +stonewall +rw=randwrite +bs=512k +iodepth=256 + +[randrw] +stonewall +rw=randrw +bs=128k +iodepth=64 diff --git a/test/vhost/lvol/lvol_test.sh b/test/vhost/lvol/lvol_test.sh index be4024ea1..1fdeba791 100755 --- a/test/vhost/lvol/lvol_test.sh +++ b/test/vhost/lvol/lvol_test.sh @@ -235,8 +235,13 @@ for vm_num in $used_vms; do fio_disks+=" --vm=${vm_num}$(printf ':/dev/%s' $SCSI_DISK)" done +if [[ $RUN_NIGHTLY -eq 1 ]]; then + job_file="default_integrity_nightly.job" +else + job_file="default_integrity.job" +fi # Run FIO traffic -run_fio $fio_bin --job-file=$COMMON_DIR/fio_jobs/default_integrity.job --out="$TEST_DIR/fio_results" $fio_disks +run_fio $fio_bin --job-file=$COMMON_DIR/fio_jobs/$job_file --out="$TEST_DIR/fio_results" $fio_disks notice "Shutting down virtual machines..." vm_shutdown_all diff --git a/test/vhost/spdk_vhost.sh b/test/vhost/spdk_vhost.sh index e2c3f2776..2e3d029b0 100755 --- a/test/vhost/spdk_vhost.sh +++ b/test/vhost/spdk_vhost.sh @@ -9,17 +9,19 @@ case $1 in -h|--help) echo "usage: $(basename $0) TEST_TYPE" echo "Test type can be:" - echo " -i |--integrity for running an integrity test with vhost scsi" - echo " -fs|--fs-integrity-scsi for running an integrity test with filesystem" - echo " -fb|--fs-integrity-blk for running an integrity test with filesystem" - echo " -p |--performance for running a performance test with vhost scsi" - echo " -ib|--integrity-blk for running an integrity test with vhost blk" - echo " -pb|--performance-blk for running a performance test with vhost blk" - echo " -ils|--integrity-lvol-scsi for running an integrity test with vhost scsi and lvol backends" - echo " -ilb|--integrity-lvol-blk for running an integrity test with vhost blk and lvol backends" - echo " -hp|--hotplug for running hotplug tests" - echo " -ro|--readonly for running readonly test for vhost blk" - echo " -h |--help prints this message" + echo " -i |--integrity for running an integrity test with vhost scsi" + echo " -fs|--fs-integrity-scsi for running an integrity test with filesystem" + echo " -fb|--fs-integrity-blk for running an integrity test with filesystem" + echo " -p |--performance for running a performance test with vhost scsi" + echo " -ib|--integrity-blk for running an integrity test with vhost blk" + echo " -pb|--performance-blk for running a performance test with vhost blk" + echo " -ils|--integrity-lvol-scsi for running an integrity test with vhost scsi and lvol backends" + echo " -ilb|--integrity-lvol-blk for running an integrity test with vhost blk and lvol backends" + echo " -ilsn|--integrity-lvol-scsi-nightly for running an nightly integrity test with vhost scsi and lvol backends" + echo " -ilbn|--integrity-lvol-blk-nightly for running an nightly integrity test with vhost blk and lvol backends" + echo " -hp|--hotplug for running hotplug tests" + echo " -ro|--readonly for running readonly test for vhost blk" + echo " -h |--help prints this message" echo "" echo "Environment:" echo " VM_IMAGE path to QCOW2 VM image used during test (default: $DEFAULT_VM_IMAGE)" @@ -48,6 +50,8 @@ if [[ ! -r "${VM_IMAGE}" ]]; then exit 1 fi +DISKS_NUMBER=`lspci -mm -n | grep 0108 | tr -d '"' | awk -F " " '{print "0000:"$1}'| wc -l` + WORKDIR=$(readlink -f $(dirname $0)) cd $WORKDIR @@ -102,6 +106,34 @@ case $1 in ./lvol/lvol_test.sh -x --fio-bin=$FIO_BIN \ --ctrl-type=spdk_vhost_blk ;; + -ilsn|--integrity-lvol-scsi-nightly) + if [[ $DISKS_NUMBER -ge 2 ]]; then + echo 'Running lvol integrity nightly suite with two cores and two controllers' + ./lvol/lvol_test.sh --fio-bin=$FIO_BIN \ + --ctrl-type=spdk_vhost_scsi --max-disks=2 --distribute-cores --vm-count=2 + + echo 'Running lvol integrity nightly suite with one core and two controllers' + ./lvol/lvol_test.sh --fio-bin=$FIO_BIN \ + --ctrl-type=spdk_vhost_scsi --max-disks=2 --vm-count=2 + fi + echo 'Running lvol integrity nightly suite with one core and one controller' + ./lvol/lvol_test.sh --fio-bin=$FIO_BIN \ + --ctrl-type=spdk_vhost_scsi --max-disks=1 + ;; + -ilbn|--integrity-lvol-blk-nightly) + if [[ $DISKS_NUMBER -ge 2 ]]; then + echo 'Running lvol integrity nightly suite with two cores and two controllers' + ./lvol/lvol_test.sh --fio-bin=$FIO_BIN \ + --ctrl-type=spdk_vhost_blk --max-disks=2 --distribute-cores --vm-count=2 + + echo 'Running lvol integrity nightly suite with one core and two controllers' + ./lvol/lvol_test.sh --fio-bin=$FIO_BIN \ + --ctrl-type=spdk_vhost_blk --max-disks=2 --vm-count=2 + fi + echo 'Running lvol integrity nightly suite with one core and one controller' + ./lvol/lvol_test.sh --fio-bin=$FIO_BIN \ + --ctrl-type=spdk_vhost_blk --max-disks=1 + ;; -hp|--hotplug) echo 'Running hotplug tests suite...' ./hotplug/scsi_hotplug.sh --fio-bin=$FIO_BIN \