test/virtio: Reduce time of virtio tests
Reduce time by compressing files before copy and adding more cores to the guest vm Change-Id: If96709884654100590a9dad32e37c6929cab9832 Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com> Reviewed-on: https://review.gerrithub.io/400624 Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
3bfd7d2b62
commit
0f80c44447
5
test/vhost/initiator/autotest.config
Normal file
5
test/vhost/initiator/autotest.config
Normal file
@ -0,0 +1,5 @@
|
||||
vhost_0_reactor_mask=0x1
|
||||
vhost_0_master_core=0
|
||||
|
||||
VM_0_qemu_mask=0x7FE
|
||||
VM_0_qemu_numa_node=0
|
@ -31,6 +31,7 @@ while getopts 'h-:' optchar; do
|
||||
done
|
||||
|
||||
source $COMMON_DIR/common.sh
|
||||
source $BASE_DIR/autotest.config
|
||||
PLUGIN_DIR=$ROOT_DIR/examples/bdev/fio_plugin
|
||||
RPC_PY="$ROOT_DIR/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
|
||||
FIO_BIN="/usr/src/fio/fio"
|
||||
@ -47,7 +48,7 @@ if [[ $EUID -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap 'rm -f *.state; error_exit "${FUNCNAME}""${LINENO}"' ERR SIGTERM SIGABRT
|
||||
trap 'rm -f *.state $ROOT_DIR/spdk.tar.gz; error_exit "${FUNCNAME}""${LINENO}"' ERR SIGTERM SIGABRT
|
||||
function run_spdk_fio() {
|
||||
LD_PRELOAD=$PLUGIN_DIR/fio_plugin $FIO_BIN --ioengine=spdk_bdev\
|
||||
"$@" --spdk_mem=1024
|
||||
@ -113,11 +114,15 @@ vm_wait_for_boot 600 $vm_no
|
||||
timing_exit vm_wait_for_boot
|
||||
|
||||
timing_enter vm_scp_spdk
|
||||
vm_scp $vm_no -r $ROOT_DIR "127.0.0.1:/root/spdk"
|
||||
touch $ROOT_DIR/spdk.tar.gz
|
||||
tar --exclude="spdk.tar.gz" --exclude="*.o" --exclude="*.d" --exclude=".git" -C $ROOT_DIR -zcf $ROOT_DIR/spdk.tar.gz .
|
||||
vm_scp $vm_no $ROOT_DIR/spdk.tar.gz "127.0.0.1:/root"
|
||||
vm_ssh $vm_no "mkdir -p /root/spdk; tar -zxf /root/spdk.tar.gz -C /root/spdk --strip-components=1"
|
||||
timing_exit vm_scp_spdk
|
||||
|
||||
timing_enter vm_build_spdk
|
||||
vm_ssh $vm_no " cd spdk ; make clean ; ./configure --with-fio=/root/fio_src ; make -j2"
|
||||
nproc=$(vm_ssh $vm_no "nproc")
|
||||
vm_ssh $vm_no " cd spdk ; make clean ; ./configure --with-fio=/root/fio_src ; make -j${nproc}"
|
||||
timing_exit vm_build_spdk
|
||||
|
||||
vm_ssh $vm_no "/root/spdk/scripts/setup.sh"
|
||||
@ -145,7 +150,7 @@ timing_enter vm_shutdown_all
|
||||
vm_shutdown_all
|
||||
timing_exit vm_shutdown_all
|
||||
|
||||
rm -f *.state
|
||||
rm -f *.state $ROOT_DIR/spdk.tar.gz
|
||||
timing_enter spdk_vhost_kill
|
||||
spdk_vhost_kill
|
||||
timing_exit spdk_vhost_kill
|
||||
|
Loading…
x
Reference in New Issue
Block a user