test: add packed ring test in blk device
Add an integrity test for the packed ring. SPDK vhost blk has already supported this format. Change-Id: I38329d837e0a5c6d4e12b30c7c99e02536ed8ac9 Signed-off-by: Jin Yu <jin.yu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4595 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
e9c815ad4c
commit
1903dd1049
@ -16,6 +16,7 @@ vms=()
|
|||||||
used_vms=""
|
used_vms=""
|
||||||
x=""
|
x=""
|
||||||
readonly=""
|
readonly=""
|
||||||
|
packed=false
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
[[ -n $2 ]] && (
|
[[ -n $2 ]] && (
|
||||||
@ -43,6 +44,7 @@ function usage() {
|
|||||||
echo " OS - VM os disk path (optional)"
|
echo " OS - VM os disk path (optional)"
|
||||||
echo " DISKS - VM os test disks/devices path (virtio - optional, kernel_vhost - mandatory)"
|
echo " DISKS - VM os test disks/devices path (virtio - optional, kernel_vhost - mandatory)"
|
||||||
echo " --readonly Use readonly for fio"
|
echo " --readonly Use readonly for fio"
|
||||||
|
echo " --packed Virtqueue format is packed"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,6 +62,7 @@ while getopts 'xh-:' optchar; do
|
|||||||
test-type=*) test_type="${OPTARG#*=}" ;;
|
test-type=*) test_type="${OPTARG#*=}" ;;
|
||||||
vm=*) vms+=("${OPTARG#*=}") ;;
|
vm=*) vms+=("${OPTARG#*=}") ;;
|
||||||
readonly) readonly="--readonly" ;;
|
readonly) readonly="--readonly" ;;
|
||||||
|
packed) packed=true ;;
|
||||||
*) usage $0 "Invalid argument '$OPTARG'" ;;
|
*) usage $0 "Invalid argument '$OPTARG'" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@ -165,6 +168,10 @@ for vm_conf in "${vms[@]}"; do
|
|||||||
[[ x"${conf[1]}" != x"" ]] && setup_cmd+=" --os=${conf[1]}"
|
[[ x"${conf[1]}" != x"" ]] && setup_cmd+=" --os=${conf[1]}"
|
||||||
[[ x"${conf[2]}" != x"" ]] && setup_cmd+=" --disks=${conf[2]}"
|
[[ x"${conf[2]}" != x"" ]] && setup_cmd+=" --disks=${conf[2]}"
|
||||||
|
|
||||||
|
if [[ "$test_type" == "spdk_vhost_blk" ]] && $packed; then
|
||||||
|
setup_cmd+=" --packed"
|
||||||
|
fi
|
||||||
|
|
||||||
$setup_cmd
|
$setup_cmd
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -104,4 +104,11 @@ echo 'Running lvol integrity suite...'
|
|||||||
run_test "vhost_blk_lvol_integrity" $WORKDIR/lvol/lvol_test.sh -x --fio-bin=$FIO_BIN \
|
run_test "vhost_blk_lvol_integrity" $WORKDIR/lvol/lvol_test.sh -x --fio-bin=$FIO_BIN \
|
||||||
--ctrl-type=spdk_vhost_blk
|
--ctrl-type=spdk_vhost_blk
|
||||||
|
|
||||||
|
echo 'Running blk packed ring integrity suite...'
|
||||||
|
run_test "vhost_blk_packed_ring_integrity" $WORKDIR/fiotest/fio.sh -x --fio-bin=$FIO_BIN \
|
||||||
|
--vm=0,$VM_IMAGE,Nvme0n1p0 \
|
||||||
|
--test-type=spdk_vhost_blk \
|
||||||
|
--fio-job=$WORKDIR/common/fio_jobs/default_integrity.job \
|
||||||
|
--packed
|
||||||
|
|
||||||
run_test "spdkcli_vhost" ./test/spdkcli/vhost.sh
|
run_test "spdkcli_vhost" ./test/spdkcli/vhost.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user