autotest: vhost_multi_os_test (porting from nightly to autotest)
Add vhost-scsi and vhost-blk multi-os test case which used Ubuntu and Centos VM in nightly Fix vhost nightly readonly case for vm shutdown timeout The 10s isn't long enough for the VM to shutdown so the script trap error in line "((timeo-=1))" in common.sh script and exit Change-Id: I5a44a2b1bf6b3247383603d5896b8bdde16a9a45 Signed-off-by: Chen Wang <chenx.wang@intel.com> Reviewed-on: https://review.gerrithub.io/393602 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: qun wan <uniqueanna@hotmail.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
60104c6f9f
commit
e8650a81ee
@ -387,7 +387,7 @@ function vm_shutdown_all()
|
||||
done
|
||||
|
||||
notice "Waiting for VMs to shutdown..."
|
||||
timeo=10
|
||||
timeo=15
|
||||
while [[ $timeo -gt 0 ]]; do
|
||||
all_vms_down=1
|
||||
for vm in $VM_BASE_DIR/[0-9]*; do
|
||||
|
@ -45,6 +45,8 @@ function usage()
|
||||
echo " on different CPU cores instead of single core."
|
||||
echo " Default: False"
|
||||
echo "-x set -x for script debug"
|
||||
echo " --multi-os Run tests on different os types in VMs"
|
||||
echo " Default: False"
|
||||
exit 0
|
||||
}
|
||||
|
||||
@ -87,6 +89,7 @@ while getopts 'xh-:' optchar; do
|
||||
nested-lvol) nested_lvol=true ;;
|
||||
distribute-cores) distribute_cores=true ;;
|
||||
thin-provisioning) thin=" -t " ;;
|
||||
multi-os) multi_os=true ;;
|
||||
*) usage $0 "Invalid argument '$OPTARG'" ;;
|
||||
esac
|
||||
;;
|
||||
@ -182,7 +185,11 @@ for (( i=0; i<$vm_count; i++)); do
|
||||
bdevs=($bdevs)
|
||||
|
||||
setup_cmd="vm_setup --disk-type=$ctrl_type --force=$i"
|
||||
setup_cmd+=" --os=/home/sys_sgsw/vhost_vm_image.qcow2"
|
||||
if [[ $i%2 -ne 0 ]] && [[ $multi_os ]]; then
|
||||
setup_cmd+=" --os=/home/sys_sgsw/spdk_vhost_CentOS_vm_image.qcow2"
|
||||
else
|
||||
setup_cmd+=" --os=/home/sys_sgsw/vhost_vm_image.qcow2"
|
||||
fi
|
||||
|
||||
# Create single SCSI controller or multiple BLK controllers for this VM
|
||||
if $distribute_cores; then
|
||||
|
@ -3,7 +3,9 @@
|
||||
set -e
|
||||
|
||||
DEFAULT_VM_IMAGE="/home/sys_sgsw/vhost_vm_image.qcow2"
|
||||
CENTOS_VM_IMAGE="/home/sys_sgsw/spdk_vhost_CentOS_vm_image.qcow2"
|
||||
DEFAULT_FIO_BIN="/home/sys_sgsw/fio_ubuntu"
|
||||
CENTOS_FIO_BIN="/home/sys_sgsw/fio_ubuntu_bak"
|
||||
|
||||
case $1 in
|
||||
-h|--help)
|
||||
@ -121,6 +123,11 @@ case $1 in
|
||||
./lvol/lvol_test.sh --fio-bin=$FIO_BIN \
|
||||
--ctrl-type=spdk_vhost_scsi --max-disks=2 --vm-count=2
|
||||
fi
|
||||
if [[ -e $CENTOS_VM_IMAGE ]]; then
|
||||
echo 'Running lvol integrity nightly suite with different os types'
|
||||
./lvol/lvol_test.sh --fio-bin=$CENTOS_FIO_BIN \
|
||||
--ctrl-type=spdk_vhost_scsi --vm-count=2 --multi-os
|
||||
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
|
||||
@ -135,6 +142,11 @@ case $1 in
|
||||
./lvol/lvol_test.sh --fio-bin=$FIO_BIN \
|
||||
--ctrl-type=spdk_vhost_blk --max-disks=2 --vm-count=2
|
||||
fi
|
||||
if [[ -e $CENTOS_VM_IMAGE ]]; then
|
||||
echo 'Running lvol integrity nightly suite with different os types'
|
||||
./lvol/lvol_test.sh --fio-bin=$CENTOS_FIO_BIN \
|
||||
--ctrl-type=spdk_vhost_blk --vm-count=2 --multi-os
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user