From e5357878676f3b5b18af2ae647b93acf6d682cf7 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Thu, 6 Jun 2019 09:24:16 -0700 Subject: [PATCH] test/vhost: Add virtio-blk to fio test Change-Id: Ia97c5ee705ce0824275ee5f792d22280bfe7e6b0 Signed-off-by: Ben Walker Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465977 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- test/vhost/fio/fio.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/vhost/fio/fio.sh b/test/vhost/fio/fio.sh index abe25841a1..181cd7c7d5 100755 --- a/test/vhost/fio/fio.sh +++ b/test/vhost/fio/fio.sh @@ -24,16 +24,28 @@ vhost_rpc vhost0 construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b M vhost_rpc vhost0 construct_vhost_scsi_controller naa.VhostScsi0.0 vhost_rpc vhost0 add_vhost_scsi_lun naa.VhostScsi0.0 0 "Malloc0" -# Start qemu based VM. +# Construct vhost blk controller +vhost_rpc vhost0 construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc1 +vhost_rpc vhost0 construct_vhost_blk_controller naa.Malloc1.1 Malloc1 + +# Start qemu based VMs vm_setup --os="$VM_IMAGE" --disk-type=spdk_vhost_scsi --disks="VhostScsi0" --vhost-name=vhost0 --force=0 +vm_setup --os="$VM_IMAGE" --disk-type=spdk_vhost_blk --disks="Malloc1" --vhost-name=vhost0 --force=1 + vm_run 0 +vm_run 1 + vm_wait_for_boot 300 0 +vm_wait_for_boot 300 1 sleep 5 # Run the fio workload on the VM vm_scp 0 $testdir/vhost_fio.job 127.0.0.1:/root/vhost_fio.job vm_exec 0 "fio /root/vhost_fio.job" +vm_scp 1 $testdir/vhost_fio.job 127.0.0.1:/root/vhost_fio.job +vm_exec 1 "fio /root/vhost_fio.job" + # Shut the VM down vm_shutdown_all