test/vhost: remove virsh use from filesystem test
Refactor filesystem test so that it does not use virsh, only qemu. Source compliation on filesystem was replaced with FIO+verify on file located on mounted filesystem. Reason for this change is that test for single filesystem type took about 1:30 for just compilation itself. Considering that we have 4 filesystems in test with 2 different vhost controllers, it took way too long. Change spaces to tabs. Change-Id: I396d653efe2bbf76934b2532576455be43632ff4 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.gerrithub.io/398603 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
8d7ddde155
commit
028c8cb4ac
12
autotest.sh
12
autotest.sh
@ -151,13 +151,13 @@ if [ $SPDK_TEST_VHOST -eq 1 ]; then
|
|||||||
run_test ./test/vhost/spdk_vhost.sh --integrity
|
run_test ./test/vhost/spdk_vhost.sh --integrity
|
||||||
timing_exit integrity
|
timing_exit integrity
|
||||||
|
|
||||||
# timing_enter fs_integrity_scsi
|
timing_enter fs_integrity_scsi
|
||||||
# run_test ./test/vhost/spdk_vhost.sh --fs-integrity-scsi
|
run_test ./test/vhost/spdk_vhost.sh --fs-integrity-scsi
|
||||||
# timing_exit fs_integrity_scsi
|
timing_exit fs_integrity_scsi
|
||||||
|
|
||||||
# timing_enter fs_integrity_blk
|
timing_enter fs_integrity_blk
|
||||||
# run_test ./test/vhost/spdk_vhost.sh --fs-integrity-blk
|
run_test ./test/vhost/spdk_vhost.sh --fs-integrity-blk
|
||||||
# timing_exit fs_integrity_blk
|
timing_exit fs_integrity_blk
|
||||||
|
|
||||||
timing_enter integrity_lvol_scsi_nightly
|
timing_enter integrity_lvol_scsi_nightly
|
||||||
run_test ./test/vhost/spdk_vhost.sh --integrity-lvol-scsi-nightly
|
run_test ./test/vhost/spdk_vhost.sh --integrity-lvol-scsi-nightly
|
||||||
|
@ -1,68 +0,0 @@
|
|||||||
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
|
||||||
<name></name>
|
|
||||||
<memory unit='GiB'>4</memory>
|
|
||||||
<currentMemory unit='GiB'>4</currentMemory>
|
|
||||||
<vcpu placement='static'>8</vcpu>
|
|
||||||
<os>
|
|
||||||
<type arch='x86_64' machine='pc-i440fx-1.6'>hvm</type>
|
|
||||||
<boot dev='hd'/>
|
|
||||||
</os>
|
|
||||||
<features>
|
|
||||||
<acpi/>
|
|
||||||
<apic/>
|
|
||||||
<pae/>
|
|
||||||
</features>
|
|
||||||
<cpu mode='host-model'>
|
|
||||||
<model fallback='allow'/>
|
|
||||||
</cpu>
|
|
||||||
<clock offset='utc'/>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>destroy</on_crash>
|
|
||||||
<devices>
|
|
||||||
<emulator></emulator>
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<driver name='qemu' type='qcow2'/>
|
|
||||||
<source file=''/>
|
|
||||||
<backingStore/>
|
|
||||||
<target dev='hda' bus='ide'/>
|
|
||||||
<address type='drive' domain='0' bus='0' slot='0' function='0'/>
|
|
||||||
</disk>
|
|
||||||
<controller type='usb' index='0'>
|
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
|
||||||
</controller>
|
|
||||||
<controller type='pci' index='0' model='pci-root'/>
|
|
||||||
<interface type='network'>
|
|
||||||
<mac address=''/>
|
|
||||||
<source network=''/>
|
|
||||||
<model type='virtio'/>
|
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
|
||||||
</interface>
|
|
||||||
<serial type='pty'>
|
|
||||||
<target port='0'/>
|
|
||||||
</serial>
|
|
||||||
<console type='pty'>
|
|
||||||
<target type='serial' port='0'/>
|
|
||||||
</console>
|
|
||||||
<input type='mouse' bus='ps2'/>
|
|
||||||
<input type='keyboard' bus='ps2'/>
|
|
||||||
<graphics type='vnc' port='-1' autoport='yes'/>
|
|
||||||
<video>
|
|
||||||
<model type='cirrus' vram='16384' heads='1'/>
|
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
|
||||||
</video>
|
|
||||||
<memballoon model='virtio'>
|
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
|
||||||
</memballoon>
|
|
||||||
</devices>
|
|
||||||
<qemu:commandline>
|
|
||||||
<qemu:arg value='-object'/>
|
|
||||||
<qemu:arg value='memory-backend-file,id=mem,size=4096M,mem-path=/dev/hugepages,share=on'/>
|
|
||||||
<qemu:arg value='-numa'/>
|
|
||||||
<qemu:arg value='node,memdev=mem'/>
|
|
||||||
<qemu:arg value='-chardev'/>
|
|
||||||
<qemu:arg value='socket,id=char0,path=/tmp/naa.0'/>
|
|
||||||
<qemu:arg value='-device'/>
|
|
||||||
<qemu:arg value='vhost_dev_args,chardev=char0'/>
|
|
||||||
</qemu:commandline>
|
|
||||||
</domain>
|
|
@ -1,8 +0,0 @@
|
|||||||
<network>
|
|
||||||
<name></name>
|
|
||||||
<bridge name="int_test_br" />
|
|
||||||
<forward />
|
|
||||||
<ip address="192.200.200.1" netmask="255.255.255.0">
|
|
||||||
<dhcp><range end="192.200.200.254" start="192.200.200.2" /></dhcp>
|
|
||||||
</ip>
|
|
||||||
</network>
|
|
@ -1,186 +1,93 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
set -xe
|
ctrl_type="spdk_vhost_scsi"
|
||||||
|
vm_fs="ext4"
|
||||||
|
|
||||||
: ${QEMU_PREFIX="/usr/local/qemu/spdk-2.12-pre"}
|
function usage()
|
||||||
|
{
|
||||||
basedir=$(readlink -f $(dirname $0))
|
[[ ! -z $2 ]] && ( echo "$2"; echo ""; )
|
||||||
rootdir=$(readlink -f $basedir/../../..)
|
echo "Shortcut script for doing automated test"
|
||||||
testdir=$(readlink -f $rootdir/..)
|
echo "Usage: $(basename $1) [OPTIONS]"
|
||||||
MAKE="make -j$(( $(nproc) * 2 ))"
|
echo
|
||||||
|
echo "-h, --help Print help and exit"
|
||||||
rpc_py="python $rootdir/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
|
echo " --work-dir=WORK_DIR Workspace for the test to run"
|
||||||
HOST_IP=192.200.200.1
|
echo " --ctrl-type=TYPE Controller type to use for test:"
|
||||||
VM_IP=192.200.200.254
|
echo " spdk_vhost_scsi - use spdk vhost scsi"
|
||||||
VM_UNAME="root"
|
echo " --fs=FS_LIST Filesystems to use for test in VM:"
|
||||||
VM_PASS="root"
|
echo " Example: --fs=\"ext4 ntfs ext2\""
|
||||||
VM_NAME="int_test_vm"
|
echo " Default: ext4"
|
||||||
VM_NET_NAME="int_test_net"
|
echo " spdk_vhost_blk - use spdk vhost block"
|
||||||
VM_MAC="02:de:ad:de:ad:01"
|
echo "-x set -x for script debug"
|
||||||
VM_BAK_IMG="/tmp/int_test_backing.img"
|
exit 0
|
||||||
TIMEO=60
|
|
||||||
SSHCMD="sshpass -p $VM_PASS ssh"
|
|
||||||
SCPCMD="sshpass -p $VM_PASS scp"
|
|
||||||
|
|
||||||
while getopts 'i:m:f:' optchar; do
|
|
||||||
case $optchar in
|
|
||||||
i) VM_IMG="${OPTARG#*=}" ;;
|
|
||||||
m) VHOST_MODE="${OPTARG#*=}" ;;
|
|
||||||
f) VM_FS="${OPTARG#*=}" ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
source $rootdir/test/common/autotest_common.sh
|
|
||||||
|
|
||||||
if [ -z "$VM_IMG" ]; then
|
|
||||||
echo "ERROR: VM_IMG: path to qcow2 image not provided - not running"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$VHOST_MODE" ]; then
|
|
||||||
echo "ERROR: VHOST_MODE: please specify Vhost mode - scsi or blk"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$VM_FS" ]; then
|
|
||||||
VM_FS="ext4"
|
|
||||||
echo "INFO: Using default value for filesystem: $VM_FS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if Qemu binary is present
|
|
||||||
if [[ -z $VM_QEMU ]]; then
|
|
||||||
VM_QEMU="$QEMU_PREFIX/bin/qemu-system-x86_64"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -x $VM_QEMU ]]; then
|
|
||||||
echo "ERROR: QEMU binary not present in $VM_QEMU"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z $QEMU_IMG ]]; then
|
|
||||||
QEMU_IMG="$QEMU_PREFIX/bin/qemu-img"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Running test with filesystem: $VM_FS"
|
|
||||||
|
|
||||||
function cleanup_virsh() {
|
|
||||||
if virsh domstate $VM_NAME; then
|
|
||||||
virsh shutdown $VM_NAME
|
|
||||||
for timeo in `seq 0 10`; do
|
|
||||||
if ! virsh domstate $VM_NAME; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ $timeo -eq 10 ]]; then
|
|
||||||
echo "ERROR: VM did not shutdown, killing!"
|
|
||||||
virsh destroy $VM_NAME
|
|
||||||
fi
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if virsh net-info $VM_NET_NAME; then
|
|
||||||
virsh net-destroy $VM_NET_NAME
|
|
||||||
fi
|
|
||||||
rm $VM_BAK_IMG || true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanup_lvol() {
|
function clean_lvol_cfg()
|
||||||
echo "INFO: Removing lvol bdevs"
|
{
|
||||||
$rpc_py delete_bdev $lb_name
|
notice "Removing lvol bdev and lvol store"
|
||||||
echo -e "\tINFO: lvol bdev $lb_name removed"
|
$rpc_py delete_bdev lvol_store/lvol_bdev
|
||||||
|
$rpc_py destroy_lvol_store -l lvol_store
|
||||||
echo "INFO: Removing lvol stores"
|
|
||||||
$rpc_py destroy_lvol_store -u $lvol_store
|
|
||||||
echo -e "\tINFO: lvol stote $lvol_store removed"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
timing_enter integrity_test
|
while getopts 'xh-:' optchar; do
|
||||||
|
case "$optchar" in
|
||||||
# Backing image for VM
|
-)
|
||||||
"$QEMU_IMG" create -f qcow2 -o backing_file=$VM_IMG $VM_BAK_IMG
|
case "$OPTARG" in
|
||||||
|
help) usage $0 ;;
|
||||||
# Prepare vhost config
|
ctrl-type=*) ctrl_type="${OPTARG#*=}" ;;
|
||||||
cp $basedir/vhost.conf.in $basedir/vhost.conf
|
fs=*) vm_fs="${OPTARG#*=}" ;;
|
||||||
$rootdir/scripts/gen_nvme.sh >> $basedir/vhost.conf
|
*) usage $0 "Invalid argument '$OPTARG'" ;;
|
||||||
|
esac
|
||||||
# Prepare .xml files for Virsh
|
;;
|
||||||
cp $basedir/base_vm.xml $basedir/vm_conf.xml
|
h) usage $0 ;;
|
||||||
cp $basedir/base_vnet.xml $basedir/vnet_conf.xml
|
x) set -x
|
||||||
sed -i "s@<name></name>@<name>$VM_NAME</name>@g" $basedir/vm_conf.xml
|
x="-x" ;;
|
||||||
sed -i "s@source file=''@source file='$VM_BAK_IMG'@g" $basedir/vm_conf.xml
|
*) usage $0 "Invalid argument '$OPTARG'"
|
||||||
sed -i "s@<emulator></emulator>@<emulator>$VM_QEMU</emulator>@g" $basedir/vm_conf.xml
|
esac
|
||||||
sed -i "s@mac address=''@mac address='$VM_MAC'@g" $basedir/vm_conf.xml
|
|
||||||
sed -i "s@source network=''@source network='$VM_NET_NAME'@g" $basedir/vm_conf.xml
|
|
||||||
sed -i "s@<name></name>@<name>$VM_NET_NAME</name>@g" $basedir/vnet_conf.xml
|
|
||||||
if [[ "$VHOST_MODE" == "scsi" ]]; then
|
|
||||||
sed -i "s@vhost_dev_args@vhost-user-scsi-pci,id=scsi0@g" $basedir/vm_conf.xml
|
|
||||||
else
|
|
||||||
sed -i "s@vhost_dev_args@vhost-user-blk-pci@g" $basedir/vm_conf.xml
|
|
||||||
fi
|
|
||||||
|
|
||||||
trap "cleanup_virsh; killprocess $pid; exit 1" SIGINT SIGTERM EXIT
|
|
||||||
|
|
||||||
virsh net-create $basedir/vnet_conf.xml
|
|
||||||
|
|
||||||
# Change directory and ownership because virsh has issues with
|
|
||||||
# paths that are in /root tree
|
|
||||||
cd /tmp
|
|
||||||
$rootdir/app/vhost/vhost -c $basedir/vhost.conf &
|
|
||||||
pid=$!
|
|
||||||
echo "Process pid: $pid"
|
|
||||||
waitforlisten "$pid"
|
|
||||||
|
|
||||||
lvol_store=$($rpc_py construct_lvol_store Nvme0n1 lvs_0)
|
|
||||||
free_mb=$(get_lvs_free_mb "$lvol_store")
|
|
||||||
lb_name=$($rpc_py construct_lvol_bdev -u $lvol_store lbd_0 $free_mb)
|
|
||||||
|
|
||||||
if [[ "$VHOST_MODE" == "scsi" ]]; then
|
|
||||||
$rpc_py construct_vhost_scsi_controller naa.0
|
|
||||||
$rpc_py add_vhost_scsi_lun naa.0 0 $lb_name
|
|
||||||
else
|
|
||||||
$rpc_py construct_vhost_blk_controller naa.0 $lb_name
|
|
||||||
fi
|
|
||||||
|
|
||||||
trap "cleanup_lvol; cleanup_virsh; killprocess $pid; exit 1" SIGINT SIGTERM EXIT ERR
|
|
||||||
|
|
||||||
chmod 777 /tmp/naa.0
|
|
||||||
|
|
||||||
virsh create $basedir/vm_conf.xml
|
|
||||||
virsh net-update $VM_NET_NAME add ip-dhcp-host "<host mac='$VM_MAC' name='$VM_NAME' ip='$VM_IP'/>"
|
|
||||||
|
|
||||||
# Wait for VM to boot
|
|
||||||
echo "INFO: Trying to connect to virtual machine..."
|
|
||||||
while ! $SSHCMD root@$VM_IP -q -oStrictHostKeyChecking=no 'echo Hello'; do
|
|
||||||
sleep 1
|
|
||||||
if ! (( TIMEO-=1 ));then
|
|
||||||
echo "ERROR: VM did not boot properly, exiting"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Run test on Virtual Machine
|
. $(readlink -e "$(dirname $0)/../common/common.sh") || exit 1
|
||||||
$SCPCMD -r $basedir/integrity_vm.sh root@$VM_IP:~
|
rpc_py="python $SPDK_BUILD_DIR/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
|
||||||
$SSHCMD root@$VM_IP "fs=$VM_FS ~/integrity_vm.sh $VHOST_MODE"
|
|
||||||
|
|
||||||
# Kill VM, cleanup config files
|
trap 'error_exit "${FUNCNAME}" "${LINENO}"' SIGTERM SIGABRT ERR
|
||||||
cleanup_virsh
|
|
||||||
rm $basedir/vm_conf.xml || true
|
|
||||||
rm $basedir/vnet_conf.xml || true
|
|
||||||
rm $basedir/vhost.conf || true
|
|
||||||
|
|
||||||
# Delete lvol bdev, destroy lvol store
|
# Try to kill if any VM remains from previous runs
|
||||||
cleanup_lvol
|
vm_kill_all
|
||||||
|
|
||||||
# Try to gracefully stop spdk vhost
|
notice "Starting SPDK vhost"
|
||||||
if /bin/kill -INT $pid; then
|
spdk_vhost_run --conf-path=$BASE_DIR
|
||||||
while /bin/kill -0 $pid; do
|
notice "..."
|
||||||
sleep 1
|
|
||||||
done
|
# Set up lvols and vhost controllers
|
||||||
elif /bin/kill -0 $pid; then
|
trap 'clean_lvol_cfg; error_exit "${FUNCNAME}" "${LINENO}"' SIGTERM SIGABRT ERR
|
||||||
killprocess $pid
|
notice "Constructing lvol store and lvol bdev on top of Nvme0n1"
|
||||||
echo "ERROR: Vhost was not closed gracefully..."
|
lvs_uuid=$($rpc_py construct_lvol_store Nvme0n1 lvol_store)
|
||||||
exit 1
|
$rpc_py construct_lvol_bdev lvol_bdev 10000 -l lvol_store
|
||||||
else
|
|
||||||
exit 1
|
if [[ "$ctrl_type" == "spdk_vhost_scsi" ]]; then
|
||||||
|
$rpc_py construct_vhost_scsi_controller naa.Nvme0n1.0
|
||||||
|
$rpc_py add_vhost_scsi_lun naa.Nvme0n1.0 0 lvol_store/lvol_bdev
|
||||||
|
elif [[ "$ctrl_type" == "spdk_vhost_blk" ]]; then
|
||||||
|
$rpc_py construct_vhost_blk_controller naa.Nvme0n1.0 lvol_store/lvol_bdev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap - SIGINT SIGTERM EXIT
|
# Set up and run VM
|
||||||
timing_exit integrity_test
|
setup_cmd="vm_setup --disk-type=$ctrl_type --force=0"
|
||||||
|
setup_cmd+=" --os=/home/sys_sgsw/vhost_vm_image.qcow2"
|
||||||
|
setup_cmd+=" --disks=Nvme0n1"
|
||||||
|
$setup_cmd
|
||||||
|
|
||||||
|
# Run VM
|
||||||
|
vm_run 0
|
||||||
|
vm_wait_for_boot 600 0
|
||||||
|
|
||||||
|
# Run tests on VM
|
||||||
|
vm_scp 0 $BASE_DIR/integrity_vm.sh root@127.0.0.1:/root/integrity_vm.sh
|
||||||
|
vm_ssh 0 "~/integrity_vm.sh $ctrl_type \"$vm_fs\""
|
||||||
|
|
||||||
|
notice "Shutting down virtual machine..."
|
||||||
|
vm_shutdown_all
|
||||||
|
|
||||||
|
clean_lvol_cfg
|
||||||
|
notice "Shutting down SPDK vhost app..."
|
||||||
|
spdk_vhost_kill
|
||||||
|
@ -4,63 +4,66 @@ set -xe
|
|||||||
basedir=$(readlink -f $(dirname $0))
|
basedir=$(readlink -f $(dirname $0))
|
||||||
MAKE="make -j$(( $(nproc) * 2 ))"
|
MAKE="make -j$(( $(nproc) * 2 ))"
|
||||||
|
|
||||||
if [[ $1 == "scsi" ]]; then
|
if [[ $1 == "spdk_vhost_scsi" ]]; then
|
||||||
devs=""
|
devs=""
|
||||||
for entry in /sys/block/sd*; do
|
for entry in /sys/block/sd*; do
|
||||||
if grep -Eq '(INTEL|RAWSCSI|LIO-ORG)' $entry/device/vendor; then
|
if grep -Eq '(INTEL|RAWSCSI|LIO-ORG)' $entry/device/vendor; then
|
||||||
devs+="$(basename $entry)"
|
devs+="$(basename $entry) "
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else script=$blk_script;
|
elif [[ $1 == "spdk_vhost_blk" ]]; then
|
||||||
devs=$(cd /sys/block; echo vd*)
|
devs=$(cd /sys/block; echo vd*)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fs=$2
|
||||||
|
|
||||||
trap "exit 1" SIGINT SIGTERM EXIT
|
trap "exit 1" SIGINT SIGTERM EXIT
|
||||||
|
|
||||||
for fs in $fs; do
|
for fs in $fs; do
|
||||||
for dev in $devs; do
|
for dev in $devs; do
|
||||||
mkfs_cmd="mkfs.$fs"
|
parted_cmd="parted -s /dev/${dev}"
|
||||||
parted_cmd="parted -s /dev/${dev}"
|
|
||||||
|
|
||||||
echo "INFO: Creating partition table on disk using: $parted_cmd mklabel gpt"
|
echo "INFO: Creating partition table on disk using: $parted_cmd mklabel gpt"
|
||||||
$parted_cmd mklabel gpt
|
$parted_cmd mklabel gpt
|
||||||
$parted_cmd mkpart primary 2048s 100%
|
$parted_cmd mkpart primary 2048s 100%
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
mkfs_cmd+=" /dev/${dev}1"
|
mkfs_cmd="mkfs.$fs"
|
||||||
echo "INFO: Creating filesystem using: $mkfs_cmd"
|
if [[ $fs == "ntfs" ]]; then
|
||||||
wipefs -a /dev/${dev}1
|
mkfs_cmd+=" -f"
|
||||||
$mkfs_cmd
|
fi
|
||||||
|
mkfs_cmd+=" /dev/${dev}1"
|
||||||
|
echo "INFO: Creating filesystem using: $mkfs_cmd"
|
||||||
|
wipefs -a /dev/${dev}1
|
||||||
|
$mkfs_cmd
|
||||||
|
|
||||||
mkdir -p /mnt/${dev}dir
|
mkdir -p /mnt/${dev}dir
|
||||||
mount -o sync /dev/${dev}1 /mnt/${dev}dir
|
mount -o sync /dev/${dev}1 /mnt/${dev}dir
|
||||||
mkdir -p /mnt/${dev}dir/linux-src
|
|
||||||
tar xf $basedir/linux-src.tar.gz -C /mnt/${dev}dir/linux-src --strip-components=1
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
# Now build SPDK
|
fio --name="integrity" --bsrange=4k-512k --iodepth=128 --numjobs=1 --direct=1 \
|
||||||
$MAKE -C /mnt/${dev}dir/linux-src defconfig
|
--thread=1 --group_reporting=1 --rw=randrw --rwmixread=70 \
|
||||||
$MAKE -C /mnt/${dev}dir/linux-src
|
--filename=/mnt/${dev}dir/test_file --verify=md5 --do_verify=1 \
|
||||||
# Print out space consumed on target device
|
--verify_backlog=1024 --fsync_on_close=1 --runtime=20 --time_based=1 --size=1G
|
||||||
df -h /dev/$dev
|
|
||||||
rm -rf /mnt/${dev}dir/linux-src
|
|
||||||
done
|
|
||||||
|
|
||||||
for dev in $devs; do
|
# Print out space consumed on target device
|
||||||
umount /mnt/${dev}dir
|
df -h /dev/$dev
|
||||||
rm -rf /mnt/${dev}dir
|
done
|
||||||
|
|
||||||
stats=( $(cat /sys/block/$dev/stat) )
|
for dev in $devs; do
|
||||||
echo ""
|
umount /mnt/${dev}dir
|
||||||
echo "$dev stats"
|
rm -rf /mnt/${dev}dir
|
||||||
printf "READ IO cnt: % 8u merges: % 8u sectors: % 8u ticks: % 8u\n" \
|
|
||||||
${stats[0]} ${stats[1]} ${stats[2]} ${stats[3]}
|
stats=( $(cat /sys/block/$dev/stat) )
|
||||||
printf "WRITE IO cnt: % 8u merges: % 8u sectors: % 8u ticks: % 8u\n" \
|
echo ""
|
||||||
${stats[4]} ${stats[5]} ${stats[6]} ${stats[7]}
|
echo "$dev stats"
|
||||||
printf "in flight: % 8u io ticks: % 8u time in queue: % 8u\n" \
|
printf "READ IO cnt: % 8u merges: % 8u sectors: % 8u ticks: % 8u\n" \
|
||||||
${stats[8]} ${stats[9]} ${stats[10]}
|
${stats[0]} ${stats[1]} ${stats[2]} ${stats[3]}
|
||||||
echo ""
|
printf "WRITE IO cnt: % 8u merges: % 8u sectors: % 8u ticks: % 8u\n" \
|
||||||
done
|
${stats[4]} ${stats[5]} ${stats[6]} ${stats[7]}
|
||||||
|
printf "in flight: % 8u io ticks: % 8u time in queue: % 8u\n" \
|
||||||
|
${stats[8]} ${stats[9]} ${stats[10]}
|
||||||
|
echo ""
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
trap - SIGINT SIGTERM EXIT
|
trap - SIGINT SIGTERM EXIT
|
||||||
|
@ -104,13 +104,13 @@ case $1 in
|
|||||||
report_test_completion "nightly_vhost_integrity_blk"
|
report_test_completion "nightly_vhost_integrity_blk"
|
||||||
;;
|
;;
|
||||||
-fs|--fs-integrity-scsi)
|
-fs|--fs-integrity-scsi)
|
||||||
echo 'Running filesystem integrity suite...'
|
echo 'Running filesystem integrity suite with SCSI...'
|
||||||
$WORKDIR/integrity/integrity_start.sh -i $VM_IMAGE -m scsi -f "xfs ntfs btrfs ext4"
|
$WORKDIR/integrity/integrity_start.sh --ctrl-type=spdk_vhost_scsi --fs="xfs ntfs btrfs ext4"
|
||||||
report_test_completion "vhost_fs_integrity_scsi"
|
report_test_completion "vhost_fs_integrity_scsi"
|
||||||
;;
|
;;
|
||||||
-fb|--fs-integrity-blk)
|
-fb|--fs-integrity-blk)
|
||||||
echo 'Running filesystem integrity suite...'
|
echo 'Running filesystem integrity suite with BLK...'
|
||||||
$WORKDIR/integrity/integrity_start.sh -i $VM_IMAGE -m blk -f "xfs ntfs btrfs ext4"
|
$WORKDIR/integrity/integrity_start.sh --ctrl-type=spdk_vhost_blk --fs="xfs ntfs btrfs ext4"
|
||||||
report_test_completion "vhost_fs_integrity_blk"
|
report_test_completion "vhost_fs_integrity_blk"
|
||||||
;;
|
;;
|
||||||
-ils|--integrity-lvol-scsi)
|
-ils|--integrity-lvol-scsi)
|
||||||
|
@ -41,8 +41,9 @@
|
|||||||
#### Filesystem integrity
|
#### Filesystem integrity
|
||||||
- runs SPDK with 1 VM with 1 NVMe device attached.
|
- runs SPDK with 1 VM with 1 NVMe device attached.
|
||||||
- creates a partition table and filesystem on passed device, and mounts it
|
- creates a partition table and filesystem on passed device, and mounts it
|
||||||
- runs Linux kernel source compilation
|
- 1GB test file is created on mounted file system and FIO randrw traffic
|
||||||
- Tested file systems: ext2, ext3, ext4, brtfs, ntfs, fat
|
(with enabled verification) is run
|
||||||
|
- Tested file systems: ext4, brtfs, ntfs, xfs
|
||||||
- runs against vhost scsi and vhost blk
|
- runs against vhost scsi and vhost blk
|
||||||
|
|
||||||
#### Windows HCK SCSI Compliance Test 2.0.
|
#### Windows HCK SCSI Compliance Test 2.0.
|
||||||
|
Loading…
Reference in New Issue
Block a user