1#!/usr/bin/env bash 2# SPDX-License-Identifier: BSD-3-Clause 3# Copyright (C) 2018 Intel Corporation 4# All rights reserved. 5# 6testdir=$(readlink -f $(dirname $0)) 7rootdir=$(readlink -f $testdir/../..) 8source $rootdir/test/common/autotest_common.sh 9source $rootdir/test/vhost/common.sh 10 11echo "Running SPDK vhost fio autotest..." 12if [[ $(uname -s) != Linux ]]; then 13 echo "" 14 echo "INFO: Vhost tests are only for Linux machine." 15 echo "" 16 exit 0 17fi 18 19vhosttestinit 20 21run_test "vhost_negative" $WORKDIR/other/negative.sh 22 23run_test "vhost_boot" $WORKDIR/vhost_boot/vhost_boot.sh --vm_image=$VM_IMAGE 24 25if [ $RUN_NIGHTLY -eq 1 ]; then 26 echo 'Running blk integrity suite...' 27 run_test "vhost_blk_integrity" $WORKDIR/fiotest/fio.sh -x --fio-bin=$FIO_BIN \ 28 --vm=0,$VM_IMAGE,Nvme0n1p0:RaidBdev0:RaidBdev1:RaidBdev2 \ 29 --test-type=spdk_vhost_blk \ 30 --fio-job=$WORKDIR/common/fio_jobs/default_integrity.job 31 32 echo 'Running SCSI integrity suite...' 33 run_test "vhost_scsi_integrity" $WORKDIR/fiotest/fio.sh -x --fio-bin=$FIO_BIN \ 34 --vm=0,$VM_IMAGE,Nvme0n1p0:RaidBdev0:RaidBdev1:RaidBdev2 \ 35 --test-type=spdk_vhost_scsi \ 36 --fio-job=$WORKDIR/common/fio_jobs/default_integrity.job 37 38 echo 'Running filesystem integrity suite with SCSI...' 39 run_test "vhost_scsi_fs_integrity" $WORKDIR/integrity/integrity_start.sh --ctrl-type=spdk_vhost_scsi --fs="xfs ntfs btrfs ext4" 40 41 echo 'Running filesystem integrity suite with BLK...' 42 run_test "vhost_blk_fs_integrity" $WORKDIR/integrity/integrity_start.sh --ctrl-type=spdk_vhost_blk --fs="xfs ntfs btrfs ext4" 43 44 echo 'Running lvol integrity nightly suite with multiple cores and two vhost controllers (vhost_scsi)' 45 run_test "vhost_scsi_cores_2ctrl" $WORKDIR/lvol/lvol_test.sh --fio-bin=$FIO_BIN \ 46 --ctrl-type=spdk_vhost_scsi --distribute-cores --vm-count=2 47 48 echo 'Running lvol integrity nightly suite with multiple cores and two vhost controllers (vhost_blk)' 49 run_test "vhost_blk_cores_2ctrl" $WORKDIR/lvol/lvol_test.sh --fio-bin=$FIO_BIN \ 50 --ctrl-type=spdk_vhost_blk --distribute-cores --vm-count=2 51 52 echo 'Running readonly tests suite...' 53 run_test "vhost_readonly" $WORKDIR/readonly/readonly.sh --vm_image=$VM_IMAGE --disk=Nvme0n1 -x 54 55 echo 'Running migration suite...' 56 run_test "vhost_migration" $WORKDIR/migration/migration.sh -x \ 57 --fio-bin=$FIO_BIN --os=$VM_IMAGE 58fi 59 60echo 'Running lvol integrity suite...' 61run_test "vhost_scsi_lvol_integrity" $WORKDIR/lvol/lvol_test.sh -x --fio-bin=$FIO_BIN \ 62 --ctrl-type=spdk_vhost_scsi --thin-provisioning 63 64echo 'Running lvol integrity suite...' 65run_test "vhost_blk_lvol_integrity" $WORKDIR/lvol/lvol_test.sh -x --fio-bin=$FIO_BIN \ 66 --ctrl-type=spdk_vhost_blk 67 68echo 'Running blk packed ring integrity suite...' 69run_test "vhost_blk_packed_ring_integrity" $WORKDIR/fiotest/fio.sh -x --fio-bin=$FIO_BIN \ 70 --vm=0,$VM_IMAGE,Nvme0n1p0 \ 71 --test-type=spdk_vhost_blk \ 72 --fio-job=$WORKDIR/common/fio_jobs/default_integrity.job \ 73 --packed 74 75run_test "spdkcli_vhost" ./test/spdkcli/vhost.sh 76