Commit 69d73d12 authored by Michal Berger's avatar Michal Berger Committed by Konrad Sztyber
Browse files

test/nvme/xnvme: Add simple test with SPDK's fio plugin



It mirrors bdevperf setup to some extent, with extra numjobs +
conserve_cpu enabled on top. This is mainly to see if slapping
that extra arg doesn't break anything.

Change-Id: I60445af635641c41fc779e5c2ce18a00e0130b60
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/25305


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarKarl Bonde Torp <k.torp@samsung.com>
Reviewed-by: default avatarJim Harris <jim.harris@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 637d0d0b
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -82,5 +82,41 @@ xnvme_bdevperf() {
	remove_null_blk
}

xnvme_fio_plugin() {
	# Use 1GB null_blk for the xnvme backend
	init_null_blk gb=1

	local xnvme0=null0 xnvme0_dev xnvme_io=()
	local io

	xnvme_io+=(libaio)
	xnvme_io+=(io_uring)

	xnvme0_dev=/dev/nullb0

	local -A method_bdev_xnvme_create_0=()
	method_bdev_xnvme_create_0["name"]=$xnvme0
	method_bdev_xnvme_create_0["filename"]=$xnvme0_dev
	method_bdev_xnvme_create_0["conserve_cpu"]=true

	for io in "${xnvme_io[@]}"; do
		method_bdev_xnvme_create_0["io_mechanism"]="$io"
		fio_bdev \
			--ioengine=spdk_bdev \
			--spdk_json_conf=<(gen_conf) \
			--filename="$xnvme0" \
			--direct=1 \
			--bs=4k \
			--iodepth=64 \
			--numjobs=1 \
			--rw=randread \
			--time_based \
			--runtime=5 \
			--thread=1 \
			--name "xnvme_bdev"
	done
}

run_test "xnvme_to_malloc_dd_copy" malloc_to_xnvme_copy
run_test "xnvme_bdevperf" xnvme_bdevperf
run_test "xnvme_fio_plugin" xnvme_fio_plugin